Class ImmutableSwapIndex

  • All Implemented Interfaces:
    Index, Named, SwapIndex, java.io.Serializable, Bean, ImmutableBean

    public final class ImmutableSwapIndex
    extends java.lang.Object
    implements SwapIndex, ImmutableBean, java.io.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​(java.lang.String name,
                                            java.time.LocalTime fixingTime,
                                            java.time.ZoneId fixingZone,
                                            FixedIborSwapTemplate 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
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

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

        public java.lang.String toString()
        Returns the name of the index.
        Overrides:
        toString in class java.lang.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 java.lang.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 java.time.LocalTime getFixingTime()
        Gets the fixing time.
        Specified by:
        getFixingTime in interface SwapIndex
        Returns:
        the value of the property, not null
      • getFixingZone

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