public final class DefaultCurveMetadata extends Object implements CurveMetadata, org.joda.beans.ImmutableBean, Serializable
This implementation of CurveMetadata provides the curve name and nodes.
| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultCurveMetadata.Meta
The meta-bean for
DefaultCurveMetadata. |
| Modifier and Type | Method and Description |
|---|---|
static DefaultCurveMetadataBuilder |
builder()
Returns a builder used to create an instance of the bean.
|
boolean |
equals(Object obj) |
<T> Optional<T> |
findInfo(CurveInfoType<T> type)
Finds curve information of a specific type.
|
CurveName |
getCurveName()
Gets the curve name.
|
ImmutableMap<CurveInfoType<?>,Object> |
getInfo()
Gets the additional curve information.
|
<T> T |
getInfo(CurveInfoType<T> type)
Gets curve information of a specific type.
|
Optional<List<ParameterMetadata>> |
getParameterMetadata()
Gets the metadata about the parameters.
|
ValueType |
getXValueType()
Gets the x-value type, providing meaning to the x-values of the curve.
|
ValueType |
getYValueType()
Gets the y-value type, providing meaning to the y-values of the curve.
|
int |
hashCode() |
static DefaultCurveMetadata.Meta |
meta()
The meta-bean for
DefaultCurveMetadata. |
DefaultCurveMetadata.Meta |
metaBean() |
static DefaultCurveMetadata |
of(CurveName name)
Creates the metadata.
|
static DefaultCurveMetadata |
of(String name)
Creates the metadata.
|
DefaultCurveMetadataBuilder |
toBuilder()
Returns a mutable builder initialized with the state of this bean.
|
String |
toString() |
<T> DefaultCurveMetadata |
withInfo(CurveInfoType<T> type,
T value)
Returns an instance where the specified additional information has been added.
|
DefaultCurveMetadata |
withParameterMetadata(List<? extends ParameterMetadata> parameterMetadata)
Returns an instance where the parameter metadata has been changed.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitfindParameterIndex, getParameterMetadatapublic static DefaultCurveMetadata of(String name)
No information will be available for the x-values, y-values or parameters.
name - the curve namepublic static DefaultCurveMetadata of(CurveName name)
No information will be available for the x-values, y-values or parameters.
name - the curve namepublic static DefaultCurveMetadataBuilder builder()
public <T> T getInfo(CurveInfoType<T> type)
CurveMetadataIf the information is not found, an exception is thrown.
The most common information is the day count and curve calibration information.
getInfo in interface CurveMetadataT - the type of the infotype - the type to findpublic <T> Optional<T> findInfo(CurveInfoType<T> type)
CurveMetadataIf the info is not found, optional empty is returned.
The most common information is the day count and curve calibration information.
findInfo in interface CurveMetadataT - the type of the infotype - the type to findpublic <T> DefaultCurveMetadata withInfo(CurveInfoType<T> type, T value)
CurveMetadata
The additional information is stored in the result using Map.put semantics,
removing the key if the instance is null.
withInfo in interface CurveMetadataT - the type of the infotype - the type to store undervalue - the value to store, may be nullpublic DefaultCurveMetadata withParameterMetadata(List<? extends ParameterMetadata> parameterMetadata)
CurveMetadataThe result will contain the specified parameter metadata. A null value is accepted and causes the result to have no parameter metadata.
withParameterMetadata in interface CurveMetadataparameterMetadata - the new parameter metadata, may be nullpublic DefaultCurveMetadataBuilder toBuilder()
public static DefaultCurveMetadata.Meta meta()
DefaultCurveMetadata.public DefaultCurveMetadata.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic CurveName getCurveName()
getCurveName in interface CurveMetadatapublic ValueType getXValueType()
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.
getXValueType in interface CurveMetadatapublic ValueType getYValueType()
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.
getYValueType in interface CurveMetadatapublic ImmutableMap<CurveInfoType<?>,Object> getInfo()
This stores additional information for the curve.
The most common information is the day count and curve calibration Jacobian.
public Optional<List<ParameterMetadata>> getParameterMetadata()
If present, the parameter metadata will match the number of parameters on the curve.
getParameterMetadata in interface CurveMetadataCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.