Class DefaultCurveMetadata
- java.lang.Object
-
- com.opengamma.strata.market.curve.DefaultCurveMetadata
-
- All Implemented Interfaces:
CurveMetadata,Serializable,org.joda.beans.Bean,org.joda.beans.ImmutableBean
public final class DefaultCurveMetadata extends Object implements CurveMetadata, org.joda.beans.ImmutableBean, Serializable
Default metadata for a curve.This implementation of
CurveMetadataprovides the curve name and nodes.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDefaultCurveMetadata.MetaThe meta-bean forDefaultCurveMetadata.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DefaultCurveMetadataBuilderbuilder()Returns a builder used to create an instance of the bean.booleanequals(Object obj)<T> Optional<T>findInfo(CurveInfoType<T> type)Finds curve information of a specific type.CurveNamegetCurveName()Gets the curve name.ImmutableMap<CurveInfoType<?>,Object>getInfo()Gets the additional curve information.<T> TgetInfo(CurveInfoType<T> type)Gets curve information of a specific type.Optional<List<ParameterMetadata>>getParameterMetadata()Gets the metadata about the parameters.ValueTypegetXValueType()Gets the x-value type, providing meaning to the x-values of the curve.ValueTypegetYValueType()Gets the y-value type, providing meaning to the y-values of the curve.inthashCode()static DefaultCurveMetadata.Metameta()The meta-bean forDefaultCurveMetadata.DefaultCurveMetadata.MetametaBean()static DefaultCurveMetadataof(CurveName name)Creates the metadata.static DefaultCurveMetadataof(String name)Creates the metadata.DefaultCurveMetadataBuildertoBuilder()Returns a mutable builder initialized with the state of this bean.StringtoString()<T> DefaultCurveMetadatawithInfo(CurveInfoType<T> type, T value)Returns an instance where the specified additional information has been added.DefaultCurveMetadatawithParameterMetadata(List<? extends ParameterMetadata> parameterMetadata)Returns an instance where the parameter metadata has been changed.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.opengamma.strata.market.curve.CurveMetadata
findParameterIndex, getParameterMetadata
-
-
-
-
Method Detail
-
of
public static DefaultCurveMetadata of(String name)
Creates the metadata.No information will be available for the x-values, y-values or parameters.
- Parameters:
name- the curve name- Returns:
- the metadata
-
of
public static DefaultCurveMetadata of(CurveName name)
Creates the metadata.No information will be available for the x-values, y-values or parameters.
- Parameters:
name- the curve name- Returns:
- the metadata
-
builder
public static DefaultCurveMetadataBuilder builder()
Returns a builder used to create an instance of the bean.- Returns:
- the builder, not null
-
getInfo
public <T> T getInfo(CurveInfoType<T> type)
Description copied from interface:CurveMetadataGets curve information of a specific type.If the information is not found, an exception is thrown.
The most common information is the day count and curve calibration information.
- Specified by:
getInfoin interfaceCurveMetadata- Type Parameters:
T- the type of the info- Parameters:
type- the type to find- Returns:
- the curve information
-
findInfo
public <T> Optional<T> findInfo(CurveInfoType<T> type)
Description copied from interface:CurveMetadataFinds curve information of a specific type.If the info is not found, optional empty is returned.
The most common information is the day count and curve calibration information.
- Specified by:
findInfoin interfaceCurveMetadata- Type Parameters:
T- the type of the info- Parameters:
type- the type to find- Returns:
- the curve information
-
withInfo
public <T> DefaultCurveMetadata withInfo(CurveInfoType<T> type, T value)
Description copied from interface:CurveMetadataReturns an instance where the specified additional information has been added.The additional information is stored in the result using
Map.putsemantics, removing the key if the instance is null.- Specified by:
withInfoin interfaceCurveMetadata- Type Parameters:
T- the type of the info- Parameters:
type- the type to store undervalue- the value to store, may be null- Returns:
- the new curve metadata
-
withParameterMetadata
public DefaultCurveMetadata withParameterMetadata(List<? extends ParameterMetadata> parameterMetadata)
Description copied from interface:CurveMetadataReturns an instance where the parameter metadata has been changed.The result will contain the specified parameter metadata. A null value is accepted and causes the result to have no parameter metadata.
- Specified by:
withParameterMetadatain interfaceCurveMetadata- Parameters:
parameterMetadata- the new parameter metadata, may be null- Returns:
- the new curve metadata
-
toBuilder
public DefaultCurveMetadataBuilder toBuilder()
Returns a mutable builder initialized with the state of this bean.- Returns:
- the mutable builder, not null
-
meta
public static DefaultCurveMetadata.Meta meta()
The meta-bean forDefaultCurveMetadata.- Returns:
- the meta-bean, not null
-
metaBean
public DefaultCurveMetadata.Meta metaBean()
- Specified by:
metaBeanin interfaceorg.joda.beans.Bean
-
getCurveName
public CurveName getCurveName()
Gets the curve name.- Specified by:
getCurveNamein interfaceCurveMetadata- Returns:
- the value of the property, not null
-
getXValueType
public ValueType getXValueType()
Gets the x-value type, providing meaning to the x-values of the curve.This type provides meaning to the x-values. For example, the x-value might represent a year fraction, as represented using
ValueType.YEAR_FRACTION.If using the builder, this defaults to
ValueType.UNKNOWN.- Specified by:
getXValueTypein interfaceCurveMetadata- Returns:
- the value of the property, not null
-
getYValueType
public ValueType getYValueType()
Gets the y-value type, providing meaning to the y-values of the curve.This type provides meaning to the y-values. For example, the y-value might represent a zero rate, as represented using
ValueType.ZERO_RATE.If using the builder, this defaults to
ValueType.UNKNOWN.- Specified by:
getYValueTypein interfaceCurveMetadata- Returns:
- the value of the property, not null
-
getInfo
public ImmutableMap<CurveInfoType<?>,Object> getInfo()
Gets the additional curve information.This stores additional information for the curve.
The most common information is the day count and curve calibration Jacobian.
- Returns:
- the value of the property, not null
-
getParameterMetadata
public Optional<List<ParameterMetadata>> getParameterMetadata()
Gets the metadata about the parameters.If present, the parameter metadata will match the number of parameters on the curve.
- Specified by:
getParameterMetadatain interfaceCurveMetadata- Returns:
- the optional value of the property, not null
-
-