public class DynamicEnum<T> extends Object implements Index<DynamicEnum.Item<T>>, Serializable
Modifier and Type | Class and Description |
---|---|
static class |
DynamicEnum.Coproduct<T> |
static class |
DynamicEnum.Item<T> |
static class |
DynamicEnum.Product<T> |
Constructor and Description |
---|
DynamicEnum() |
DynamicEnum(Collection<? extends T> items) |
DynamicEnum(T... items) |
Modifier and Type | Method and Description |
---|---|
DynamicEnum.Item<T> |
add(T data) |
boolean |
contains(DynamicEnum.Item<T> i) |
boolean |
containsSemichecked(DynamicEnum.Item<?> i) |
boolean |
containsUnchecked(Object o) |
DynamicEnum.Item<T> |
get(int i)
Returns the object associated with a given number.
|
int |
indexOf(DynamicEnum.Item<T> i) |
int |
indexOfUnchecked(Object o) |
List<DynamicEnum.Item<T>> |
items() |
Iterator<DynamicEnum.Item<T>> |
iterator() |
void |
seal() |
int |
size()
Returns the number of objects in this index.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public DynamicEnum()
public DynamicEnum(T... items)
public DynamicEnum(Collection<? extends T> items)
public DynamicEnum.Item<T> add(T data)
public void seal()
public int size()
Index
size
in interface Index<DynamicEnum.Item<T>>
public Iterator<DynamicEnum.Item<T>> iterator()
iterator
in interface Iterable<DynamicEnum.Item<T>>
public List<DynamicEnum.Item<T>> items()
public DynamicEnum.Item<T> get(int i)
Index
get
in interface Index<DynamicEnum.Item<T>>
public int indexOf(DynamicEnum.Item<T> i)
indexOf
in interface Index<DynamicEnum.Item<T>>
public int indexOfUnchecked(Object o)
indexOfUnchecked
in interface Index<DynamicEnum.Item<T>>
public boolean contains(DynamicEnum.Item<T> i)
contains
in interface Index<DynamicEnum.Item<T>>
public boolean containsSemichecked(DynamicEnum.Item<?> i)
public boolean containsUnchecked(Object o)
containsUnchecked
in interface Index<DynamicEnum.Item<T>>
see also the complete user documentation .