Enumeration
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 :
Methods
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. |
toString()
public String toString()
Returns a string that represents the current object.
Returns: java.lang.String - String representation
getAll(Class typeOfT)
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.
equals(Object obj)
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 .
equals(Enumeration other)
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 .
hashCode()
public int hashCode()
Serves as the default hash function.
Returns: int - A hash code for the current object.
fromValue(Class typeOfT, String value)
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
fromDisplayName(Class typeOfT, String displayName)
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
compareTo(Object obj)
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
op_Equality(Enumeration left, Enumeration right)
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
op_Inequality(Enumeration left, Enumeration right)
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