Class ImmutablePriceIndex
- java.lang.Object
-
- com.opengamma.strata.basics.index.ImmutablePriceIndex
-
- All Implemented Interfaces:
FloatingRate
,FloatingRateIndex
,Index
,PriceIndex
,Named
,Serializable
,org.joda.beans.Bean
,org.joda.beans.ImmutableBean
public final class ImmutablePriceIndex extends Object implements PriceIndex, org.joda.beans.ImmutableBean, Serializable
A price index implementation based on an immutable set of rules.A standard immutable implementation of
PriceIndex
.In most cases, applications should refer to indices by name, using
PriceIndex.of(String)
. The named index will typically be resolved to an instance of this class. As such, it is recommended to use thePriceIndex
interface in application code rather than directly referring to this class.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ImmutablePriceIndex.Builder
The bean-builder forImmutablePriceIndex
.static class
ImmutablePriceIndex.Meta
The meta-bean forImmutablePriceIndex
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutablePriceIndex.Builder
builder()
Returns a builder used to create an instance of the bean.boolean
equals(Object obj)
Currency
getCurrency()
Gets the currency of the index.FloatingRateName
getFloatingRateName()
Gets the floating rate name for this index.String
getName()
Gets the index name, such as 'GB-HICP'.Frequency
getPublicationFrequency()
Gets the publication frequency of the index.Country
getRegion()
Gets the region of the index.int
hashCode()
boolean
isActive()
Gets whether the index is active, defaulted to true.static ImmutablePriceIndex.Meta
meta()
The meta-bean forImmutablePriceIndex
.ImmutablePriceIndex.Meta
metaBean()
ImmutablePriceIndex.Builder
toBuilder()
Returns a builder that allows this bean to be mutated.String
toString()
Returns the name of the index.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.opengamma.strata.basics.index.FloatingRateIndex
getDefaultFixedLegDayCount
-
Methods inherited from interface com.opengamma.strata.basics.index.PriceIndex
getDayCount
-
-
-
-
Method Detail
-
getFloatingRateName
public FloatingRateName getFloatingRateName()
Description copied from interface:FloatingRateIndex
Gets the floating rate name for this index.For an Ibor index, the
FloatingRateName
does not include the tenor. It can be used to find the other tenors available for this index.- Specified by:
getFloatingRateName
in interfaceFloatingRate
- Specified by:
getFloatingRateName
in interfaceFloatingRateIndex
- Returns:
- the floating rate name
-
toString
public String toString()
Returns the name of the index.
-
meta
public static ImmutablePriceIndex.Meta meta()
The meta-bean forImmutablePriceIndex
.- Returns:
- the meta-bean, not null
-
builder
public static ImmutablePriceIndex.Builder builder()
Returns a builder used to create an instance of the bean.- Returns:
- the builder, not null
-
metaBean
public ImmutablePriceIndex.Meta metaBean()
- Specified by:
metaBean
in interfaceorg.joda.beans.Bean
-
getName
public String getName()
Gets the index name, such as 'GB-HICP'.- Specified by:
getName
in interfaceFloatingRateIndex
- Specified by:
getName
in interfaceIndex
- Specified by:
getName
in interfaceNamed
- Specified by:
getName
in interfacePriceIndex
- Returns:
- the value of the property, not null
-
getRegion
public Country getRegion()
Gets the region of the index.- Specified by:
getRegion
in interfacePriceIndex
- Returns:
- the value of the property, not null
-
getCurrency
public Currency getCurrency()
Gets the currency of the index.- Specified by:
getCurrency
in interfaceFloatingRate
- Specified by:
getCurrency
in interfaceFloatingRateIndex
- Returns:
- the value of the property, not null
-
isActive
public boolean isActive()
Gets whether the index is active, defaulted to true.Over time some indices become inactive and are no longer produced. If this occurs, this flag will be set to false.
- Specified by:
isActive
in interfaceFloatingRateIndex
- Returns:
- the value of the property
-
getPublicationFrequency
public Frequency getPublicationFrequency()
Gets the publication frequency of the index. Most price indices are published monthly, but some are published quarterly.- Specified by:
getPublicationFrequency
in interfacePriceIndex
- Returns:
- the value of the property, not null
-
toBuilder
public ImmutablePriceIndex.Builder toBuilder()
Returns a builder that allows this bean to be mutated.- Returns:
- the mutable builder, not null
-
-