Enum FloatingRateType

  • All Implemented Interfaces:
    Named, NamedEnum, java.io.Serializable, java.lang.Comparable<FloatingRateType>

    public enum FloatingRateType
    extends java.lang.Enum<FloatingRateType>
    implements NamedEnum
    The type of a floating rate index.

    This provides a high-level categorization of the floating rate index. This is used to classify the index and create the right kind of pricing index, IborIndex or OvernightIndex.

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      IBOR
      A floating rate index that is based on an Ibor index.
      OTHER
      A floating rate index of another type.
      OVERNIGHT_AVERAGED
      A floating rate index that is based on an Overnight index with averaging.
      OVERNIGHT_COMPOUNDED
      A floating rate index that is based on an Overnight index with compounding.
      PRICE
      A floating rate index that is based on a price index.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isIbor()
      Checks if the type is 'Ibor'.
      boolean isOvernight()
      Checks if the type is 'OvernightCompounded' or 'OvernightAveraged'.
      boolean isPrice()
      Checks if the type is 'Price'.
      static FloatingRateType of​(java.lang.String name)
      Obtains an instance from the specified name.
      java.lang.String toString()
      Returns the formatted name of the type.
      static FloatingRateType valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static FloatingRateType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface com.opengamma.strata.collect.named.NamedEnum

        getName
    • Enum Constant Detail

      • IBOR

        public static final FloatingRateType IBOR
        A floating rate index that is based on an Ibor index.

        This kind of rate translates to an IborIndex.

      • OVERNIGHT_COMPOUNDED

        public static final FloatingRateType OVERNIGHT_COMPOUNDED
        A floating rate index that is based on an Overnight index with compounding.

        This kind of rate translates to an OvernightIndex.

      • OVERNIGHT_AVERAGED

        public static final FloatingRateType OVERNIGHT_AVERAGED
        A floating rate index that is based on an Overnight index with averaging.

        This kind of rate translates to an OvernightIndex. This is typically used only for US Fed Fund swaps.

      • PRICE

        public static final FloatingRateType PRICE
        A floating rate index that is based on a price index.

        This kind of rate translates to an PriceIndex.

      • OTHER

        public static final FloatingRateType OTHER
        A floating rate index of another type.
    • Method Detail

      • values

        public static FloatingRateType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (FloatingRateType c : FloatingRateType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static FloatingRateType valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • of

        public static FloatingRateType of​(java.lang.String name)
        Obtains an instance from the specified name.

        Parsing handles the mixed case form produced by toString() and the upper and lower case variants of the enum constant name.

        Parameters:
        name - the name to parse
        Returns:
        the type
        Throws:
        java.lang.IllegalArgumentException - if the name is not known
      • isIbor

        public boolean isIbor()
        Checks if the type is 'Ibor'.
        Returns:
        true if Ibor, false otherwise
      • isOvernight

        public boolean isOvernight()
        Checks if the type is 'OvernightCompounded' or 'OvernightAveraged'.
        Returns:
        true if Overnight, false otherwise
      • isPrice

        public boolean isPrice()
        Checks if the type is 'Price'.
        Returns:
        true if Price, false otherwise
      • toString

        public java.lang.String toString()
        Returns the formatted name of the type.
        Overrides:
        toString in class java.lang.Enum<FloatingRateType>
        Returns:
        the formatted string representing the type