Enumeration
Leave feedback
On this page
Inheritance: java.lang.Object
All Implemented Interfaces: java.lang.Comparable, java.io.Serializable, com.aspose.ms.System.IEquatable
public abstract class Enumeration implements Comparable, Serializable, System.IEquatable<Enumeration>
Generic enumeration class.
TKey :
| Method | Description |
|---|---|
| toString() | Returns a string that represents the current object. |
| Returns all enumeration values. | |
| equals(Object obj) | Determines whether two object instances are equal. |
| equals(Enumeration other) | Determines whether two object instances are equal. |
| hashCode() | Serves as the default hash function. |
| Returns object by key. | |
| Returns object by display name. | |
| compareTo(Object obj) | Compares current object to other. |
| op_Equality(Enumeration left, Enumeration right) | Equality operator. |
| op_Inequality(Enumeration left, Enumeration right) | Inequality operator. |
public String toString()
Returns a string that represents the current object.
Returns: java.lang.String - String representation
public static List <T>getAll(Class<T> typeOfT)
Returns all enumeration values.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| typeOfT | java.lang.Class |
Returns: java.util.List - Enumerable of the provided type
T : Enumerated object type.
public boolean equals(Object obj)
Determines whether two object instances are equal.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| obj | java.lang.Object | The object to compare with the current object. |
Returns: boolean - true if the specified object is equal to the current object; otherwise, false .
public boolean equals(Enumeration other)
Determines whether two object instances are equal.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| other | Enumeration | The object to compare with the current object. |
Returns: boolean - true if the specified object is equal to the current object; otherwise, false .
public int hashCode()
Serves as the default hash function.
Returns: int - A hash code for the current object.
public static T <T>fromValue(Class<T> typeOfT, String value)
Returns object by key.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| typeOfT | java.lang.Class |
|
| value | java.lang.String | The value |
Returns: T - The object
public static T <T>fromDisplayName(Class<T> typeOfT, String displayName)
Returns object by display name.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| typeOfT | java.lang.Class |
|
| displayName | java.lang.String | The display name |
Returns: T - The object
public final int compareTo(Object obj)
Compares current object to other.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| obj | java.lang.Object | The other object |
Returns: int - zero if equal
public static boolean op_Equality(Enumeration left, Enumeration right)
Equality operator.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| left | Enumeration | The first object |
| right | Enumeration | The second object |
Returns: boolean - true if objects are equal
public static boolean op_Inequality(Enumeration left, Enumeration right)
Inequality operator.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| left | Enumeration | The first object |
| right | Enumeration | The second object |
Returns: boolean - true if objects are not equal
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.