public interface SurfaceMetadata
Implementations of this interface are used to store metadata about a surface.
For example, a surface may be defined based on financial instruments.
The parameters might represent 1 day, 1 week, 1 month, 3 month and 6 months.
The metadata could be used to describe each parameter in terms of a Tenor.
This metadata can be used by applications to interpret the parameters of the surface. For example, the scenario framework uses the data when applying perturbations.
| Modifier and Type | Method and Description |
|---|---|
<T> Optional<T> |
findInfo(SurfaceInfoType<T> type)
Finds surface information of a specific type.
|
default OptionalInt |
findParameterIndex(ParameterMetadata metadata)
Finds the parameter index of the specified metadata.
|
default <T> T |
getInfo(SurfaceInfoType<T> type)
Gets surface information of a specific type.
|
Optional<List<ParameterMetadata>> |
getParameterMetadata()
Gets metadata about each parameter underlying the surface, optional.
|
default ParameterMetadata |
getParameterMetadata(int parameterIndex)
Gets the metadata of the parameter at the specified index.
|
SurfaceName |
getSurfaceName()
Gets the surface name.
|
ValueType |
getXValueType()
Gets the x-value type, providing meaning to the x-values of the surface.
|
ValueType |
getYValueType()
Gets the y-value type, providing meaning to the y-values of the surface.
|
ValueType |
getZValueType()
Gets the z-value type, providing meaning to the z-values of the surface.
|
<T> DefaultSurfaceMetadata |
withInfo(SurfaceInfoType<T> type,
T value)
Returns an instance where the specified additional information has been added.
|
SurfaceMetadata |
withParameterMetadata(List<? extends ParameterMetadata> parameterMetadata)
Returns an instance where the parameter metadata has been changed.
|
SurfaceName getSurfaceName()
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.
ValueType getYValueType()
This type provides meaning to the y-values.
ValueType getZValueType()
This type provides meaning to the z-values.
default <T> T getInfo(SurfaceInfoType<T> type)
If the information is not found, an exception is thrown.
T - the type of the infotype - the type to findIllegalArgumentException - if the information is not found<T> Optional<T> findInfo(SurfaceInfoType<T> type)
If the info is not found, optional empty is returned.
T - the type of the infotype - the type to finddefault ParameterMetadata getParameterMetadata(int parameterIndex)
If there is no specific parameter metadata, an empty instance will be returned.
parameterIndex - the zero-based index of the parameter to getIndexOutOfBoundsException - if the index is invalidOptional<List<ParameterMetadata>> getParameterMetadata()
If present, the parameter metadata will match the number of parameters on the surface.
default OptionalInt findParameterIndex(ParameterMetadata metadata)
If the parameter metadata is not matched, an empty optional will be returned.
metadata - the parameter metadata to find the index of<T> DefaultSurfaceMetadata withInfo(SurfaceInfoType<T> type, T value)
The additional information is stored in the result using Map.put semantics,
removing the key if the instance is null.
T - the type of the infotype - the type to store undervalue - the value to store, may be nullSurfaceMetadata withParameterMetadata(List<? extends ParameterMetadata> parameterMetadata)
The result will contain the specified parameter metadata. A null value is accepted and causes the result to have no parameter metadata.
parameterMetadata - the new parameter metadata, may be nullCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.