public abstract class Enumeration extends Object implements Comparable, Serializable, com.aspose.ms.System.IEquatable<Enumeration>
Generic enumeration class.
TKey:
| Modifier | Constructor and Description |
|---|---|
protected |
Enumeration()
Serialization constructor
|
protected |
Enumeration(String key,
String name)
Initializes new instance of Enumeration class.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Object obj)
Compares current object to other.
|
boolean |
equals(Enumeration other)
Determines whether two object instances are equal.
|
boolean |
equals(Object obj)
Determines whether two object instances are equal.
|
static <T extends Enumeration> |
fromDisplayName(Class<T> typeOfT,
String displayName)
Returns object by display name.
|
static <T extends Enumeration> |
fromValue(Class<T> typeOfT,
String value)
Returns object by key.
|
static <T extends Enumeration> |
getAll(Class<T> typeOfT)
Returns all enumeration values.
|
protected String |
getKey()
The enumeration key.
|
protected String |
getName()
The enumeration name.
|
int |
hashCode()
Serves as the default hash function.
|
static boolean |
op_Equality(Enumeration left,
Enumeration right)
Equality operator.
|
static boolean |
op_Inequality(Enumeration left,
Enumeration right)
Inequality operator.
|
String |
toString()
Returns a string that represents the current object.
|
public final int compareTo(Object obj)
Compares current object to other.
compareTo in interface Comparableobj - The other objectpublic boolean equals(Enumeration other)
Determines whether two object instances are equal.
other - The object to compare with the current object.true if the specified object is equal to the current object; otherwise, false.public boolean equals(Object obj)
Determines whether two object instances are equal.
equals in interface com.aspose.ms.System.IEquatable<Enumeration>equals in class Objectobj - The object to compare with the current object.true if the specified object is equal to the current object; otherwise, false.public static <T extends Enumeration> T fromDisplayName(Class<T> typeOfT, String displayName)
Returns object by display name.
displayName - The display namepublic static <T extends Enumeration> T fromValue(Class<T> typeOfT, String value)
Returns object by key.
value - The valuepublic static <T extends Enumeration> List getAll(Class<T> typeOfT)
Returns all enumeration values.
T: Enumerated object type.
protected final String getKey()
The enumeration key.
protected final String getName()
The enumeration name.
public int hashCode()
Serves as the default hash function.
public static boolean op_Equality(Enumeration left, Enumeration right)
Equality operator.
left - The first objectright - The second objecttrue if objects are equalpublic static boolean op_Inequality(Enumeration left, Enumeration right)
Inequality operator.
left - The first objectright - The second objecttrue if objects are not equalCopyright © 2024. All rights reserved.