com.uwyn.rife.datastructures
Class EnumClass<IdentifierType>
java.lang.Object
com.uwyn.rife.datastructures.EnumClass<IdentifierType>
- Direct Known Subclasses:
- ArrayUtils.ArrayType, ConstrainedBean.Direction, CreateTable.Nullable, CreateTable.ViolationAction, ElementInfoProcessorFactory, ElementType, FormStateType, MimeType, OrdinalManager.Direction, PathInfoMode, QueryParameterType, RequestMethod, Scope, Select.JoinCondition, Select.JoinType, Select.OrderByDirection, SequenceValue.Operation, SiteProcessorFactory, StringEncryptor, StringUtils.BbcodeOption, TemplateFactory
public abstract class EnumClass<IdentifierType>
- extends Object
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
- Version:
- $Revision: 3634 $
- Author:
- Geert Bevin (gbevin[remove] at uwyn dot com)
mIdentifier
protected IdentifierType mIdentifier
EnumClass
protected EnumClass(IdentifierType identifier)
EnumClass
protected EnumClass(Class klass,
IdentifierType identifier)
registerType
protected final void registerType(Class klass,
IdentifierType identifier)
getIdentifiers
protected static Collection<?> getIdentifiers(Class<? extends EnumClass> type)
getMembers
protected static Collection<? extends EnumClass> getMembers(Class<? extends EnumClass> type)
getMember
protected static <MemberType extends EnumClass> MemberType getMember(Class<MemberType> type,
Object identifier)
toString
public String toString()
- Overrides:
toString in class Object
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
equals
public boolean equals(Object object)
- Overrides:
equals in class Object
Copyright © 2001-2007 Uwyn sprl/bvba. All Rights Reserved.