Package com.opengamma.strata.data
Class MarketDataName<T>
- java.lang.Object
-
- com.opengamma.strata.data.MarketDataName<T>
-
- Type Parameters:
T
- the type of the market data this identifier refers to
- All Implemented Interfaces:
Named
,Comparable<MarketDataName<?>>
- Direct Known Subclasses:
BondFutureVolatilitiesName
,BondVolatilitiesName
,CurveName
,FxOptionVolatilitiesName
,IborCapletFloorletVolatilitiesName
,IborFutureOptionVolatilitiesName
,SurfaceName
,SwaptionVolatilitiesName
public abstract class MarketDataName<T> extends Object implements Named, Comparable<MarketDataName<?>>
A name for an item of market data.The name is used to locate an item in market data. While a
MarketDataId
is unique within a system, aMarketDataName
is not. However, it is intended to be unique within any single coherent data set.For example, a curve group contains a set of curves, and within the group the name is unique. But the market data system may contain many curve groups where the same name appears in each group. The
MarketDataId
includes both the group name and curve name in order to ensure uniqueness.
-
-
Constructor Summary
Constructors Constructor Description MarketDataName()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description int
compareTo(MarketDataName<?> other)
Compares this name to another.boolean
equals(Object obj)
Checks if this instance equals another.abstract Class<T>
getMarketDataType()
Gets the type of data this name refers to.abstract String
getName()
Gets the market data name.int
hashCode()
Returns a suitable hash code.String
toString()
Returns the name.
-
-
-
Method Detail
-
getName
public abstract String getName()
Gets the market data name.The name must be unique within any single coherent data set.
-
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 interfaceComparable<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.
-
hashCode
public final int hashCode()
Returns a suitable hash code.
-
-