Class ImmutableSwapIndex
- java.lang.Object
-
- com.opengamma.strata.product.swap.ImmutableSwapIndex
-
- All Implemented Interfaces:
Index
,Named
,SwapIndex
,Serializable
,org.joda.beans.Bean
,org.joda.beans.ImmutableBean
public final class ImmutableSwapIndex extends Object implements SwapIndex, org.joda.beans.ImmutableBean, Serializable
A swap index implementation based on an immutable set of rules.A standard immutable implementation of
SwapIndex
that defines the swap trade template, including the swap convention and tenor.In most cases, applications should refer to indices by name, using
SwapIndex.of(String)
. The named index will typically be resolved to an instance of this class. As such, it is recommended to use theSwapIndex
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
ImmutableSwapIndex.Builder
The bean-builder forImmutableSwapIndex
.static class
ImmutableSwapIndex.Meta
The meta-bean forImmutableSwapIndex
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableSwapIndex.Builder
builder()
Returns a builder used to create an instance of the bean.boolean
equals(Object obj)
LocalTime
getFixingTime()
Gets the fixing time.ZoneId
getFixingZone()
Gets the time-zone of the fixing time.String
getName()
Gets the index name.FixedFloatSwapTemplate
getTemplate()
Gets the template for creating a Fixed-Ibor or Fixed-Overnight swap.int
hashCode()
boolean
isActive()
Gets whether the index is active, defaulted to true.static ImmutableSwapIndex.Meta
meta()
The meta-bean forImmutableSwapIndex
.ImmutableSwapIndex.Meta
metaBean()
static ImmutableSwapIndex
of(String name, LocalTime fixingTime, ZoneId fixingZone, FixedFloatSwapTemplate template)
Obtains an instance from the specified name, time and template.ImmutableSwapIndex.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.product.swap.SwapIndex
calculateFixingDateTime
-
-
-
-
Method Detail
-
of
public static ImmutableSwapIndex of(String name, LocalTime fixingTime, ZoneId fixingZone, FixedFloatSwapTemplate template)
Obtains an instance from the specified name, time and template.- Parameters:
name
- the index namefixingTime
- the fixing timefixingZone
- the time-zone of the fixing timetemplate
- the swap template- Returns:
- the index
-
toString
public String toString()
Returns the name of the index.
-
meta
public static ImmutableSwapIndex.Meta meta()
The meta-bean forImmutableSwapIndex
.- Returns:
- the meta-bean, not null
-
builder
public static ImmutableSwapIndex.Builder builder()
Returns a builder used to create an instance of the bean.- Returns:
- the builder, not null
-
metaBean
public ImmutableSwapIndex.Meta metaBean()
- Specified by:
metaBean
in interfaceorg.joda.beans.Bean
-
getName
public String getName()
Gets the index name.
-
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.
-
getFixingTime
public LocalTime getFixingTime()
Gets the fixing time.- Specified by:
getFixingTime
in interfaceSwapIndex
- Returns:
- the value of the property, not null
-
getFixingZone
public ZoneId getFixingZone()
Gets the time-zone of the fixing time.- Specified by:
getFixingZone
in interfaceSwapIndex
- Returns:
- the value of the property, not null
-
getTemplate
public FixedFloatSwapTemplate getTemplate()
Gets the template for creating a Fixed-Ibor or Fixed-Overnight swap.- Specified by:
getTemplate
in interfaceSwapIndex
- Returns:
- the value of the property, not null
-
toBuilder
public ImmutableSwapIndex.Builder toBuilder()
Returns a builder that allows this bean to be mutated.- Returns:
- the mutable builder, not null
-
-