Enum SwapLegType

    • Enum Constant Detail

      • FIXED

        public static final SwapLegType FIXED
        A fixed rate swap leg. All periods in this leg must have a fixed rate.
      • IBOR

        public static final SwapLegType IBOR
        A floating rate swap leg based on an Ibor index.

        This kind of leg may include some fixed periods, such as in a stub or where the first rate is specified in the contract.

      • OVERNIGHT

        public static final SwapLegType OVERNIGHT
        A floating rate swap leg based on an Overnight index.

        This kind of leg may include some fixed periods, such as in a stub or where the first rate is specified in the contract.

      • INFLATION

        public static final SwapLegType INFLATION
        A floating rate swap leg based on an price index.

        This kind of leg may include some reference dates where the index rate is specified.

      • OTHER

        public static final SwapLegType OTHER
        A swap leg that is not based on a Fixed, Ibor, Overnight or Inflation rate.
    • Method Detail

      • values

        public static SwapLegType[] 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 (SwapLegType c : SwapLegType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static SwapLegType valueOf​(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:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • of

        public static SwapLegType of​(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:
        IllegalArgumentException - if the name is not known
      • isFixed

        public boolean isFixed()
        Checks if the type is 'Fixed'.
        Returns:
        true if fixed, false otherwise
      • isFloat

        public boolean isFloat()
        Checks if the type is floating, defined as 'Ibor', 'Overnight' or 'Inflation'.
        Returns:
        true if floating, false otherwise
      • toString

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