public enum CompareResult extends java.lang.Enum<CompareResult> implements IEnumType, IIntegerRepresentation
Comparator.compare(Object, Object)
.Modifier and Type | Method and Description |
---|---|
java.lang.Integer |
asInteger()
Returns the integer representation of the implementing object.
|
java.lang.String |
asString()
Returns the string representation of the implementing object.
|
boolean |
isEqual()
Returns true if this instance represents the 'equal' result.
|
boolean |
isGreater()
Returns true if this instance represents the 'equal' result.
|
boolean |
isLess()
Returns true if this instance represents the 'less' result.
|
static CompareResult |
of(int value)
Returns the enum value that corresponds to the given integer value.
|
java.lang.String |
toString() |
static CompareResult |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static CompareResult[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
getDeclaringClass, name, ordinal
public static final CompareResult LESS
public static final CompareResult EQUAL
public static final CompareResult GREATER
public static CompareResult[] values()
for (CompareResult c : CompareResult.values()) System.out.println(c);
public static CompareResult 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 CompareResult of(int value)
public java.lang.Integer asInteger()
IIntegerRepresentation
asInteger
in interface IIntegerRepresentation
public java.lang.String asString()
IStringRepresentation
asString
in interface IStringRepresentation
public boolean isLess()
public boolean isEqual()
public boolean isGreater()
public java.lang.String toString()
toString
in class java.lang.Enum<CompareResult>