Package org.organicdesign.fp.function
Enum Fn2.Singletons
- java.lang.Object
-
- java.lang.Enum<Fn2.Singletons>
-
- org.organicdesign.fp.function.Fn2.Singletons
-
- All Implemented Interfaces:
Serializable
,Comparable<Fn2.Singletons>
,BiFunction
,Fn2
public static enum Fn2.Singletons extends Enum<Fn2.Singletons> implements Fn2
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.organicdesign.fp.function.Fn2
Fn2.Singletons
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Fn2.Singletons
valueOf(String name)
Returns the enum constant of this type with the specified name.static Fn2.Singletons[]
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, toString, valueOf
-
Methods inherited from interface java.util.function.BiFunction
andThen
-
-
-
-
Enum Constant Detail
-
FIRST
public static final Fn2.Singletons FIRST
A static function that always returns the first argument it is given. For type safety, please useFn2.first()
instead of accessing this directly.
-
SECOND
public static final Fn2.Singletons SECOND
A static function that always returns the second argument it is given. For type safety, please useFn2.second()
instead of accessing this directly.
-
-
Method Detail
-
values
public static Fn2.Singletons[] 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 (Fn2.Singletons c : Fn2.Singletons.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Fn2.Singletons 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 nameNullPointerException
- if the argument is null
-
-