Class YearMonthDateParameterMetadata
- java.lang.Object
-
- com.opengamma.strata.market.param.YearMonthDateParameterMetadata
-
- All Implemented Interfaces:
DatedParameterMetadata
,ParameterMetadata
,Serializable
,org.joda.beans.Bean
,org.joda.beans.ImmutableBean
public final class YearMonthDateParameterMetadata extends Object implements DatedParameterMetadata, org.joda.beans.ImmutableBean, Serializable
Parameter metadata based on a date and year-month.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
YearMonthDateParameterMetadata.Meta
The meta-bean forYearMonthDateParameterMetadata
.
-
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.YearMonth
getIdentifier()
Gets the identifier, which is the year-month.String
getLabel()
Gets the label that describes the parameter, defaulted to the year-month.YearMonth
getYearMonth()
Gets the year-month associated with the parameter.int
hashCode()
static YearMonthDateParameterMetadata.Meta
meta()
The meta-bean forYearMonthDateParameterMetadata
.YearMonthDateParameterMetadata.Meta
metaBean()
static YearMonthDateParameterMetadata
of(LocalDate date, YearMonth yearMonth)
Obtains an instance using the year-month.static YearMonthDateParameterMetadata
of(LocalDate date, YearMonth yearMonth, String label)
Obtains an instance using the year-month, specifying the label.String
toString()
-
-
-
Method Detail
-
of
public static YearMonthDateParameterMetadata of(LocalDate date, YearMonth yearMonth)
Obtains an instance using the year-month.- Parameters:
date
- the date associated with the parameteryearMonth
- the year-month of the curve node- Returns:
- the parameter metadata based on the year-month
-
of
public static YearMonthDateParameterMetadata of(LocalDate date, YearMonth yearMonth, String label)
Obtains an instance using the year-month, specifying the label.- Parameters:
date
- the date associated with the parameteryearMonth
- the year-month of the curve nodelabel
- the label to use- Returns:
- the parameter metadata based on the year-month
-
getIdentifier
public YearMonth getIdentifier()
Gets the identifier, which is the year-month.- Specified by:
getIdentifier
in interfaceParameterMetadata
- Returns:
- the year-month
-
meta
public static YearMonthDateParameterMetadata.Meta meta()
The meta-bean forYearMonthDateParameterMetadata
.- Returns:
- the meta-bean, not null
-
metaBean
public YearMonthDateParameterMetadata.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
-
getYearMonth
public YearMonth getYearMonth()
Gets the year-month associated with the parameter.- Returns:
- the value of the property, not null
-
getLabel
public String getLabel()
Gets the label that describes the parameter, defaulted to the year-month.- Specified by:
getLabel
in interfaceParameterMetadata
- Returns:
- the value of the property, not empty
-
-