Class 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 the SwapIndex interface in application code rather than directly referring to this class.

    See Also:
    Serialized Form
    • 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 name
        fixingTime - the fixing time
        fixingZone - the time-zone of the fixing time
        template - the swap template
        Returns:
        the index
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • toString

        public String toString()
        Returns the name of the index.
        Overrides:
        toString in class Object
        Returns:
        the name of the index
      • meta

        public static ImmutableSwapIndex.Meta meta()
        The meta-bean for ImmutableSwapIndex.
        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
      • getName

        public String getName()
        Gets the index name.
        Specified by:
        getName in interface Index
        Specified by:
        getName in interface Named
        Specified by:
        getName in interface SwapIndex
        Returns:
        the value of the property, not empty
      • 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 interface SwapIndex
        Returns:
        the value of the property
      • getFixingTime

        public LocalTime getFixingTime()
        Gets the fixing time.
        Specified by:
        getFixingTime in interface SwapIndex
        Returns:
        the value of the property, not null
      • getFixingZone

        public ZoneId getFixingZone()
        Gets the time-zone of the fixing time.
        Specified by:
        getFixingZone in interface SwapIndex
        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 interface SwapIndex
        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