public final class DefaultSurfaceMetadata extends Object implements SurfaceMetadata, org.joda.beans.ImmutableBean, Serializable
This implementation of SurfaceMetadata provides the surface name and nodes.
| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultSurfaceMetadata.Meta
The meta-bean for
DefaultSurfaceMetadata. |
| Modifier and Type | Method and Description |
|---|---|
static DefaultSurfaceMetadataBuilder |
builder()
Returns a builder used to create an instance of the bean.
|
boolean |
equals(Object obj) |
<T> Optional<T> |
findInfo(SurfaceInfoType<T> type)
Finds surface information of a specific type.
|
ImmutableMap<SurfaceInfoType<?>,Object> |
getInfo()
Gets the additional surface information.
|
<T> T |
getInfo(SurfaceInfoType<T> type)
Gets surface information of a specific type.
|
Optional<List<ParameterMetadata>> |
getParameterMetadata()
Gets the metadata about the parameters.
|
SurfaceName |
getSurfaceName()
Gets the surface name.
|
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.
|
ValueType |
getZValueType()
Gets the x-value type, providing meaning to the z-values of the curve.
|
int |
hashCode() |
static DefaultSurfaceMetadata.Meta |
meta()
The meta-bean for
DefaultSurfaceMetadata. |
DefaultSurfaceMetadata.Meta |
metaBean() |
static DefaultSurfaceMetadata |
of(String name)
Creates the metadata.
|
static DefaultSurfaceMetadata |
of(SurfaceName name)
Creates the metadata.
|
DefaultSurfaceMetadataBuilder |
toBuilder()
Returns a mutable builder initialized with the state of this bean.
|
String |
toString() |
<T> DefaultSurfaceMetadata |
withInfo(SurfaceInfoType<T> type,
T value)
Returns an instance where the specified additional information has been added.
|
DefaultSurfaceMetadata |
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 DefaultSurfaceMetadata of(String name)
No information will be available for the x-values, y-values, z-values or parameters.
name - the surface namepublic static DefaultSurfaceMetadata of(SurfaceName name)
No information will be available for the x-values, y-values, z-values or parameters.
name - the surface namepublic static DefaultSurfaceMetadataBuilder builder()
public <T> T getInfo(SurfaceInfoType<T> type)
SurfaceMetadataIf the information is not found, an exception is thrown.
getInfo in interface SurfaceMetadataT - the type of the infotype - the type to findpublic <T> Optional<T> findInfo(SurfaceInfoType<T> type)
SurfaceMetadataIf the info is not found, optional empty is returned.
findInfo in interface SurfaceMetadataT - the type of the infotype - the type to findpublic <T> DefaultSurfaceMetadata withInfo(SurfaceInfoType<T> type, T value)
SurfaceMetadata
The additional information is stored in the result using Map.put semantics,
removing the key if the instance is null.
withInfo in interface SurfaceMetadataT - the type of the infotype - the type to store undervalue - the value to store, may be nullpublic DefaultSurfaceMetadata withParameterMetadata(List<? extends ParameterMetadata> parameterMetadata)
SurfaceMetadataThe result will contain the specified parameter metadata. A null value is accepted and causes the result to have no parameter metadata.
withParameterMetadata in interface SurfaceMetadataparameterMetadata - the new parameter metadata, may be nullpublic DefaultSurfaceMetadataBuilder toBuilder()
public static DefaultSurfaceMetadata.Meta meta()
DefaultSurfaceMetadata.public DefaultSurfaceMetadata.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic SurfaceName getSurfaceName()
getSurfaceName in interface SurfaceMetadatapublic 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 SurfaceMetadatapublic ValueType getYValueType()
This type provides meaning to the y-values.
If using the builder, this defaults to ValueType.UNKNOWN.
getYValueType in interface SurfaceMetadatapublic ValueType getZValueType()
This type provides meaning to the z-values.
If using the builder, this defaults to ValueType.UNKNOWN.
getZValueType in interface SurfaceMetadatapublic ImmutableMap<SurfaceInfoType<?>,Object> getInfo()
This stores additional information for the surface.
public Optional<List<ParameterMetadata>> getParameterMetadata()
If present, the parameter metadata should match the number of parameters on the surface.
getParameterMetadata in interface SurfaceMetadataCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.