E
- the element typepublic abstract class DynaEnum<E extends DynaEnum<E>> extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
DynaEnum.DynaEnumEventListener<E>
DynaEnumEventListener is the interface for getting informed if any new items are added
|
Modifier and Type | Field and Description |
---|---|
protected int |
ordinal |
Modifier | Constructor and Description |
---|---|
protected |
DynaEnum(String name,
int ordinal)
Instantiates a new dyna enum.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addElement()
add this element to the list of elements
|
protected static void |
addListener(Class<? extends DynaEnum<?>> clazz,
DynaEnum.DynaEnumEventListener listener)
add a new DynaEnumEventListener.
|
protected Object |
clone() |
int |
compareTo(E other) |
boolean |
equals(Object other) |
Class<E> |
getDeclaringClass() |
int |
hashCode() |
String |
name() |
int |
ordinal()
Ordinal.
|
protected static void |
removeListener(Class<? extends DynaEnum<?>> clazz,
DynaEnum.DynaEnumEventListener listener)
remove the given DynaEnumEventListener
|
String |
toString() |
protected static void |
valueAdded(Class<? extends DynaEnum> clazz,
DynaEnum<?> value) |
static <T extends DynaEnum<T>> |
valueOf(Class<T> enumType,
String name)
Value of.
|
static <E> DynaEnum<? extends DynaEnum<?>>[] |
values()
Values.
|
static <E> E[] |
values(Class<E> enumType)
Values.
|
protected DynaEnum(String name, int ordinal)
name
- the nameordinal
- the ordinalpublic final String name()
public final int ordinal()
protected void addElement()
protected final Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
public final int compareTo(E other)
public static <T extends DynaEnum<T>> T valueOf(Class<T> enumType, String name)
T
- the generic typeenumType
- the enum typename
- the namepublic static <E> DynaEnum<? extends DynaEnum<?>>[] values()
E
- the element typepublic static <E> E[] values(Class<E> enumType)
E
- the element typeenumType
- the enum typeprotected static void addListener(Class<? extends DynaEnum<?>> clazz, DynaEnum.DynaEnumEventListener listener)
clazz
- the class to register the listener forlistener
- the new listener to be addedprotected static void removeListener(Class<? extends DynaEnum<?>> clazz, DynaEnum.DynaEnumEventListener listener)
clazz
- the class to de-register the listener forlistener
- the listener to be removedCopyright © 2012–2019 tinyMediaManager. All rights reserved.