public class EnumerationType
extends java.lang.Object
implements java.lang.Iterable<java.lang.String>
| Constructor and Description |
|---|
EnumerationType(java.lang.Class<? extends java.lang.Enum<?>> enumClass) |
EnumerationType(java.lang.String nameOrNull,
java.lang.Class<? extends java.lang.Enum<?>> enumClass) |
EnumerationType(java.lang.String nameOrNull,
java.lang.String[] values) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getName()
Returns the name of this type, if it exists, or
NONAME otherwise. |
HDF5EnumerationType.EnumStorageForm |
getStorageForm()
Returns the
HDF5EnumerationType.EnumStorageForm of this enumeration type. |
java.util.List<java.lang.String> |
getValues()
Returns the allowed values of this enumeration type.
|
int |
hashCode() |
java.util.Iterator<java.lang.String> |
iterator()
Returns an
Iterator over all values of this enumeration type. |
java.lang.Integer |
tryGetIndexForValue(java.lang.String value)
Returns the ordinal value for the given string value, if value is a
member of the enumeration, and
null otherwise. |
java.lang.String |
tryGetName()
Returns the name of this type, if it exists, or
null otherwise. |
public EnumerationType(java.lang.String nameOrNull,
java.lang.String[] values)
public EnumerationType(java.lang.Class<? extends java.lang.Enum<?>> enumClass)
public EnumerationType(java.lang.String nameOrNull,
java.lang.Class<? extends java.lang.Enum<?>> enumClass)
public java.lang.Integer tryGetIndexForValue(java.lang.String value)
null otherwise.public java.lang.String getName()
NONAME otherwise.public java.lang.String tryGetName()
null otherwise.public java.util.List<java.lang.String> getValues()
public HDF5EnumerationType.EnumStorageForm getStorageForm()
HDF5EnumerationType.EnumStorageForm of this enumeration type.public java.util.Iterator<java.lang.String> iterator()
Iterator over all values of this enumeration type.
Iterator.remove() is not allowed and will throw an
UnsupportedOperationException.iterator in interface java.lang.Iterable<java.lang.String>public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object