Class DefaultSurfaceMetadataBuilder
- java.lang.Object
-
- com.opengamma.strata.market.surface.DefaultSurfaceMetadataBuilder
-
public final class DefaultSurfaceMetadataBuilder extends Object
Builder for surface metadata.This is created using
DefaultSurfaceMetadata.builder().
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> DefaultSurfaceMetadataBuilderaddInfo(SurfaceInfoType<T> type, T value)Adds a single piece of additional information.DefaultSurfaceMetadatabuild()Builds the metadata instance.DefaultSurfaceMetadataBuilderclearParameterMetadata()Clears the parameter-level metadata.DefaultSurfaceMetadataBuilderdayCount(DayCount dayCount)Sets the day count.DefaultSurfaceMetadataBuilderparameterMetadata(ParameterMetadata... parameterMetadata)Sets the parameter-level metadata.DefaultSurfaceMetadataBuilderparameterMetadata(List<? extends ParameterMetadata> parameterMetadata)Sets the parameter-level metadata.DefaultSurfaceMetadataBuildersurfaceName(SurfaceName surfaceName)Sets the surface name.DefaultSurfaceMetadataBuildersurfaceName(String surfaceName)Sets the surface name.DefaultSurfaceMetadataBuilderxValueType(ValueType xValueType)Sets the x-value type, providing meaning to the x-values of the surface.DefaultSurfaceMetadataBuilderyValueType(ValueType yValueType)Sets the y-value type, providing meaning to the y-values of the surface.DefaultSurfaceMetadataBuilderzValueType(ValueType zValueType)Sets the z-value type, providing meaning to the z-values of the surface.
-
-
-
Method Detail
-
surfaceName
public DefaultSurfaceMetadataBuilder surfaceName(String surfaceName)
Sets the surface name.- Parameters:
surfaceName- the surface name- Returns:
- this, for chaining
-
surfaceName
public DefaultSurfaceMetadataBuilder surfaceName(SurfaceName surfaceName)
Sets the surface name.- Parameters:
surfaceName- the surface name- Returns:
- this, for chaining
-
xValueType
public DefaultSurfaceMetadataBuilder xValueType(ValueType xValueType)
Sets the x-value type, providing meaning to the x-values of the surface.This type provides meaning to the x-values.
If using the builder, this defaults to
ValueType.UNKNOWN.- Parameters:
xValueType- the x-value type- Returns:
- this, for chaining
-
yValueType
public DefaultSurfaceMetadataBuilder yValueType(ValueType yValueType)
Sets the y-value type, providing meaning to the y-values of the surface.This type provides meaning to the y-values.
If using the builder, this defaults to
ValueType.UNKNOWN.- Parameters:
yValueType- the y-value type- Returns:
- this, for chaining
-
zValueType
public DefaultSurfaceMetadataBuilder zValueType(ValueType zValueType)
Sets the z-value type, providing meaning to the z-values of the surface.This type provides meaning to the z-values.
If using the builder, this defaults to
ValueType.UNKNOWN.- Parameters:
zValueType- the z-value type- Returns:
- this, for chaining
-
dayCount
public DefaultSurfaceMetadataBuilder dayCount(DayCount dayCount)
Sets the day count.This stores the day count in the additional information map using the key
SurfaceInfoType.DAY_COUNT.This is stored in the additional information map using
Map.putsemantics, removing the key if the day count is null.- Parameters:
dayCount- the day count, may be null- Returns:
- this, for chaining
-
addInfo
public <T> DefaultSurfaceMetadataBuilder addInfo(SurfaceInfoType<T> type, T value)
Adds a single piece of additional information.This is stored in the additional information map using
Map.putsemantics, removing the key if the instance is null.- Type Parameters:
T- the type of the info- Parameters:
type- the type to store undervalue- the value to store, may be null- Returns:
- this, for chaining
-
parameterMetadata
public DefaultSurfaceMetadataBuilder parameterMetadata(List<? extends ParameterMetadata> parameterMetadata)
Sets the parameter-level metadata.The parameter metadata must match the number of parameters on the surface. This will replace the existing parameter-level metadata.
- Parameters:
parameterMetadata- the parameter metadata- Returns:
- this, for chaining
-
parameterMetadata
public DefaultSurfaceMetadataBuilder parameterMetadata(ParameterMetadata... parameterMetadata)
Sets the parameter-level metadata.The parameter metadata must match the number of parameters on the surface. This will replace the existing parameter-level metadata.
- Parameters:
parameterMetadata- the parameter metadata- Returns:
- this, for chaining
-
clearParameterMetadata
public DefaultSurfaceMetadataBuilder clearParameterMetadata()
Clears the parameter-level metadata.The existing parameter-level metadata will be removed.
- Returns:
- this, for chaining
-
build
public DefaultSurfaceMetadata build()
Builds the metadata instance.- Returns:
- the instance
-
-