Package rife.datastructures
Class EnumClass<IdentifierType>
java.lang.Object
rife.datastructures.EnumClass<IdentifierType>
- Direct Known Subclasses:
ConstrainedBean.Direction
,CreateTable.Nullable
,CreateTable.ViolationAction
,MimeType
,OrdinalManager.Direction
,QueryParameterType
,Select.JoinCondition
,Select.JoinType
,Select.OrderByDirection
,SequenceValue.Operation
,StringEncryptor
,TemplateFactory
The purpose of this abstract base class is to allow the creation of
type-safe enumerations.
Only the derived class is allowed to create instances and should do so
as public static final
objects.
Each instance of a EnumClass
class needs an identifier to
its constructor. This identifier is used to uniquely differentiate
enumeration members amongst each-other.
- Since:
- 1.0
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
EnumClass
(IdentifierType identifier) protected
EnumClass
(Class klass, IdentifierType identifier) -
Method Summary
Modifier and TypeMethodDescriptionboolean
protected static Collection<?>
getIdentifiers
(Class<? extends EnumClass> type) protected static <MemberType extends EnumClass>
MemberTypeprotected static Collection<? extends EnumClass>
getMembers
(Class<? extends EnumClass> type) int
hashCode()
protected final void
registerType
(Class klass, IdentifierType identifier) toString()