Class DefaultMetadata

  • All Implemented Interfaces:
    Metadata


    public class DefaultMetadata
    extends java.lang.Object
    implements Metadata
    The default implementation of Metadata
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected DefaultMetadata​(java.lang.String name, java.lang.String displayName, java.lang.String description, MetricType type, java.lang.String unit, boolean reusable)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      java.util.Optional<java.lang.String> getDescription​()
      Returns the description of the metric.
      java.lang.String getDisplayName​()
      Returns the display name if set, otherwise this method returns the metric name.
      java.lang.String getName​()
      Returns the metric name.
      java.lang.String getType​()
      Returns the String representation of the MetricType.
      MetricType getTypeRaw​()
      Returns the MetricType of the metric
      java.util.Optional<java.lang.String> getUnit​()  
      int hashCode​()  
      boolean isReusable​()  
      java.lang.String toString​()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • DefaultMetadata

        protected DefaultMetadata​(java.lang.String name,
                                  java.lang.String displayName,
                                  java.lang.String description,
                                  MetricType type,
                                  java.lang.String unit,
                                  boolean reusable)
    • Method Detail

      • getName

        public java.lang.String getName​()
        Description copied from interface: Metadata
        Returns the metric name.
        Specified by:
        getName in interface Metadata
        Returns:
        the metric name.
      • getDisplayName

        public java.lang.String getDisplayName​()
        Description copied from interface: Metadata
        Returns the display name if set, otherwise this method returns the metric name.
        Specified by:
        getDisplayName in interface Metadata
        Returns:
        the display name
      • getDescription

        public java.util.Optional<java.lang.String> getDescription​()
        Description copied from interface: Metadata
        Returns the description of the metric.
        Specified by:
        getDescription in interface Metadata
        Returns:
        the description
      • getType

        public java.lang.String getType​()
        Description copied from interface: Metadata
        Returns the String representation of the MetricType.
        Specified by:
        getType in interface Metadata
        Returns:
        the MetricType as a String
        See Also:
        MetricType
      • getUnit

        public java.util.Optional<java.lang.String> getUnit​()
        Specified by:
        getUnit in interface Metadata
      • isReusable

        public boolean isReusable​()
        Specified by:
        isReusable in interface Metadata
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode​()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString​()
        Overrides:
        toString in class java.lang.Object