Class MarketDataName<T>

    • Constructor Detail

      • MarketDataName

        public MarketDataName()
    • Method Detail

      • getName

        public abstract String getName()
        Gets the market data name.

        The name must be unique within any single coherent data set.

        Specified by:
        getName in interface Named
        Returns:
        the unique name
      • getMarketDataType

        public abstract Class<T> getMarketDataType()
        Gets the type of data this name refers to.
        Returns:
        the type of the market data this name refers to
      • compareTo

        public int compareTo​(MarketDataName<?> other)
        Compares this name to another.

        Instances are compared in alphabetical order based on the name, taking into account the implementation type.

        Specified by:
        compareTo in interface Comparable<T>
        Parameters:
        other - the object to compare to
        Returns:
        the comparison
      • equals

        public final boolean equals​(Object obj)
        Checks if this instance equals another.

        Instances are compared based on the name and market data type.

        Overrides:
        equals in class Object
        Parameters:
        obj - the object to compare to, null returns false
        Returns:
        true if equal
      • hashCode

        public final int hashCode()
        Returns a suitable hash code.
        Overrides:
        hashCode in class Object
        Returns:
        a suitable hash code
      • toString

        public final String toString()
        Returns the name.
        Overrides:
        toString in class Object
        Returns:
        the name