public enum SelfComparator extends java.lang.Enum<SelfComparator> implements java.util.Comparator<java.lang.Comparable>
| Enum Constant and Description |
|---|
INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
int |
compare(java.lang.Comparable o1,
java.lang.Comparable o2) |
static <T extends java.lang.Comparable<? super T>> |
instance() |
static SelfComparator |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static SelfComparator[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SelfComparator INSTANCE
public static SelfComparator[] values()
for (SelfComparator c : SelfComparator.values()) System.out.println(c);
public static SelfComparator valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic static <T extends java.lang.Comparable<? super T>> java.util.Comparator<T> instance()
public int compare(java.lang.Comparable o1,
java.lang.Comparable o2)
compare in interface java.util.Comparator<java.lang.Comparable>