public final class HDF5EnumerationValue
extends java.lang.Object
Constructor and Description |
---|
HDF5EnumerationValue(HDF5EnumerationType type,
java.lang.Enum<?> value)
Creates an enumeration value.
|
HDF5EnumerationValue(HDF5EnumerationType type,
int ordinal)
Creates an enumeration value.
|
HDF5EnumerationValue(HDF5EnumerationType type,
java.lang.String value)
Creates an enumeration value.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getDescription()
Returns a description of this value.
|
int |
getOrdinal()
Returns the ordinal value.
|
HDF5EnumerationType |
getType()
Returns the type of this enumeration value.
|
java.lang.String |
getValue()
Returns the string value.
|
<T extends java.lang.Enum<T>> |
getValue(java.lang.Class<T> enumClass)
Returns the value as Enum of type enumClass.
|
int |
hashCode() |
java.lang.String |
toString() |
public HDF5EnumerationValue(HDF5EnumerationType type, java.lang.Enum<?> value) throws java.lang.IllegalArgumentException
type
- The enumeration type of this value.value
- The value in the type.java.lang.IllegalArgumentException
- If the ordinal is outside of the range of allowed
values of the type.public HDF5EnumerationValue(HDF5EnumerationType type, int ordinal) throws java.lang.IllegalArgumentException
type
- The enumeration type of this value.ordinal
- The ordinal value of the value in the type.java.lang.IllegalArgumentException
- If the ordinal is outside of the range of allowed
values of the type.public HDF5EnumerationValue(HDF5EnumerationType type, java.lang.String value) throws java.lang.IllegalArgumentException
type
- The enumeration type of this value.value
- The string value (needs to be one of the values of type).java.lang.IllegalArgumentException
- If the value is not one of the values of
type.public HDF5EnumerationType getType()
public java.lang.String getValue()
public int getOrdinal()
public <T extends java.lang.Enum<T>> T getValue(java.lang.Class<T> enumClass)
public java.lang.String getDescription()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object