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