public abstract class Enum extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
Enum(int value)
Overloaded.
|
protected |
Enum(int value,
String name)
Overloaded.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o)
Indicates whether some other object is equal to this one.
|
int |
getIntValue()
Returns the integer value of this enum.
|
boolean |
greater(Enum en)
Indicates whether the integer value of this Enum is greater
than the integer value of some other Enum.
|
boolean |
greaterEqual(Enum en)
Indicates whether the integer value of this Enum is greater
than or equal to the integer value of some other Enum.
|
boolean |
less(Enum en)
Indicates whether the integer value of this Enum is less than
the integer value of some other Enum.
|
boolean |
lessEqual(Enum en)
Indicates whether the integer value of this Enum is less than
or equal to the integer value of some other Enum.
|
String |
toString()
Overridden.
|
protected Enum(int value)
value - The integer value of the resulting Enum.protected Enum(int value,
String name)
value - The integer value of the resulting Enumname - Specifies the name of this instance. Describes this Enum objectpublic String toString()
public int getIntValue()
public boolean equals(Object o)
This method returns true if the supplied Object is an Enum and has the same integer value as returned by the getIntValue() method of this object. If the supplied Object is not an Enum, this method calls the equals method of the parent class.
public boolean less(Enum en)
en - The enum to compare this enum with.public boolean lessEqual(Enum en)
en - The enum to compare this enum with.public boolean greater(Enum en)
en - The enum to compare this enum with.public boolean greaterEqual(Enum en)
en - The enum to compare this enum with.Copyright © 2023. All rights reserved.