Enum Either.Selector

    • Enum Constant Detail

      • First

        public static final Either.Selector First
        Represents the first choice.
      • Second

        public static final Either.Selector Second
        Represents the second choice.
      • Third

        public static final Either.Selector Third
        Represents the third choice.
    • Method Detail

      • values

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

        public static Either.Selector 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
      • isFirst

        public boolean isFirst()
        Checks if the current selection is First.
        Returns:
        true if the selection is First, false otherwise
      • isSecond

        public boolean isSecond()
        Checks if the current selection is Second.
        Returns:
        true if the selection is Second, false otherwise
      • isThird

        public boolean isThird()
        Checks if the current selection is Third.
        Returns:
        true if the selection is Third, false otherwise