Package org.organicdesign.fp.collections
Enum ComparisonContext.CompCtx
- java.lang.Object
-
- java.lang.Enum<ComparisonContext.CompCtx>
-
- org.organicdesign.fp.collections.ComparisonContext.CompCtx
-
- All Implemented Interfaces:
Serializable
,Comparable<ComparisonContext.CompCtx>
,Comparator<Comparable<Object>>
,ComparisonContext<Comparable<Object>>
,Equator<Comparable<Object>>
- Enclosing interface:
- ComparisonContext<T>
public static enum ComparisonContext.CompCtx extends Enum<ComparisonContext.CompCtx> implements ComparisonContext<Comparable<Object>>
Please access this type-safely throughComparisonContext.defCompCtx()
instead of calling directly. This exists because Enums are serializable and lambdas are not. Enums also make ideal singletons.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.organicdesign.fp.collections.ComparisonContext
ComparisonContext.CompCtx
-
Nested classes/interfaces inherited from interface org.organicdesign.fp.collections.Equator
Equator.Comp, Equator.Equat
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DEFAULT
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ComparisonContext.CompCtx
valueOf(String name)
Returns the enum constant of this type with the specified name.static ComparisonContext.CompCtx[]
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.Comparator
compare, equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Enum Constant Detail
-
DEFAULT
public static final ComparisonContext.CompCtx DEFAULT
-
-
Method Detail
-
values
public static ComparisonContext.CompCtx[] 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 (ComparisonContext.CompCtx c : ComparisonContext.CompCtx.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ComparisonContext.CompCtx 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
-
-