Class TenorDateParameterMetadata
- java.lang.Object
-
- com.opengamma.strata.market.param.TenorDateParameterMetadata
-
- All Implemented Interfaces:
DatedParameterMetadata
,ParameterMetadata
,TenoredParameterMetadata
,Serializable
,org.joda.beans.Bean
,org.joda.beans.ImmutableBean
public final class TenorDateParameterMetadata extends Object implements DatedParameterMetadata, TenoredParameterMetadata, org.joda.beans.ImmutableBean, Serializable
Parameter metadata based on a date and tenor.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TenorDateParameterMetadata.Meta
The meta-bean forTenorDateParameterMetadata
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
LocalDate
getDate()
Gets the date associated with the parameter.Tenor
getIdentifier()
Gets the identifier, which is the tenor.String
getLabel()
Gets the label that describes the parameter, defaulted to the tenor.Tenor
getTenor()
Gets the tenor associated with the parameter.int
hashCode()
static TenorDateParameterMetadata.Meta
meta()
The meta-bean forTenorDateParameterMetadata
.TenorDateParameterMetadata.Meta
metaBean()
static TenorDateParameterMetadata
of(LocalDate date, Tenor tenor)
Obtains an instance using the tenor.static TenorDateParameterMetadata
of(LocalDate date, Tenor tenor, String label)
Obtains an instance using the tenor, specifying the label.String
toString()
TenorDateParameterMetadata
withTenor(Tenor tenor)
Returns an instance with the tenor updated.
-
-
-
Method Detail
-
of
public static TenorDateParameterMetadata of(LocalDate date, Tenor tenor)
Obtains an instance using the tenor.- Parameters:
date
- the date associated with the parametertenor
- the tenor associated with the parameter- Returns:
- the parameter metadata based on the tenor
-
of
public static TenorDateParameterMetadata of(LocalDate date, Tenor tenor, String label)
Obtains an instance using the tenor, specifying the label.- Parameters:
date
- the date associated with the parametertenor
- the tenor associated with the parameterlabel
- the label to use- Returns:
- the parameter metadata based on the tenor
-
getIdentifier
public Tenor getIdentifier()
Gets the identifier, which is the tenor.- Specified by:
getIdentifier
in interfaceParameterMetadata
- Returns:
- the tenor
-
withTenor
public TenorDateParameterMetadata withTenor(Tenor tenor)
Description copied from interface:TenoredParameterMetadata
Returns an instance with the tenor updated.- Specified by:
withTenor
in interfaceTenoredParameterMetadata
- Parameters:
tenor
- the tenor to update to- Returns:
- the updated metadata
-
meta
public static TenorDateParameterMetadata.Meta meta()
The meta-bean forTenorDateParameterMetadata
.- Returns:
- the meta-bean, not null
-
metaBean
public TenorDateParameterMetadata.Meta metaBean()
- Specified by:
metaBean
in interfaceorg.joda.beans.Bean
-
getDate
public LocalDate getDate()
Gets the date associated with the parameter.This is the date that is most closely associated with the parameter. The actual parameter is typically a year fraction based on a day count.
- Specified by:
getDate
in interfaceDatedParameterMetadata
- Returns:
- the value of the property, not null
-
getTenor
public Tenor getTenor()
Gets the tenor associated with the parameter.- Specified by:
getTenor
in interfaceTenoredParameterMetadata
- Returns:
- the value of the property, not null
-
getLabel
public String getLabel()
Gets the label that describes the parameter, defaulted to the tenor.- Specified by:
getLabel
in interfaceParameterMetadata
- Returns:
- the value of the property, not empty
-
-