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 thePriceIndexinterface 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 classImmutablePriceIndex.BuilderThe bean-builder forImmutablePriceIndex.static classImmutablePriceIndex.MetaThe meta-bean forImmutablePriceIndex.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutablePriceIndex.Builderbuilder()Returns a builder used to create an instance of the bean.booleanequals(Object obj)CurrencygetCurrency()Gets the currency of the index.FloatingRateNamegetFloatingRateName()Gets the floating rate name for this index.StringgetName()Gets the index name, such as 'GB-HICP'.FrequencygetPublicationFrequency()Gets the publication frequency of the index.CountrygetRegion()Gets the region of the index.inthashCode()booleanisActive()Gets whether the index is active, defaulted to true.static ImmutablePriceIndex.Metameta()The meta-bean forImmutablePriceIndex.ImmutablePriceIndex.MetametaBean()ImmutablePriceIndex.BuildertoBuilder()Returns a builder that allows this bean to be mutated.StringtoString()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:FloatingRateIndexGets the floating rate name for this index.For an Ibor index, the
FloatingRateNamedoes not include the tenor. It can be used to find the other tenors available for this index.- Specified by:
getFloatingRateNamein interfaceFloatingRate- Specified by:
getFloatingRateNamein 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:
metaBeanin interfaceorg.joda.beans.Bean
-
getName
public String getName()
Gets the index name, such as 'GB-HICP'.- Specified by:
getNamein interfaceFloatingRateIndex- Specified by:
getNamein interfaceIndex- Specified by:
getNamein interfaceNamed- Specified by:
getNamein interfacePriceIndex- Returns:
- the value of the property, not null
-
getRegion
public Country getRegion()
Gets the region of the index.- Specified by:
getRegionin interfacePriceIndex- Returns:
- the value of the property, not null
-
getCurrency
public Currency getCurrency()
Gets the currency of the index.- Specified by:
getCurrencyin interfaceFloatingRate- Specified by:
getCurrencyin 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:
isActivein 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:
getPublicationFrequencyin 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
-
-