|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--com.sap.netweaver.bc.rf.util.flyweight.FlyWeight
|
+--com.sap.netweaver.bc.rf.util.enum.Enum
Abstract class implementing a type-safe enumeration. You have to extend this class, add your public final static enumeration members and implement an appropriate private constructor:
public class Status extends Enum
{
public final static Status SUCCESS = new Status( 1 );
public final static Status FAILURE = new Status( 2 );
private A( final int id )
{
super( id );
}
}
| Constructor Summary | |
protected |
Enum(int id,
boolean ignoreDuplicateRegistration)
Construct instance of an enumeration. |
| Method Summary | |
java.lang.Object |
clone()
Clone this enumeration. |
int |
compareTo(java.lang.Object obj)
Compare this and another object for order. |
boolean |
equals(java.lang.Object obj)
Compare this and another object for equality. |
static java.util.List |
getAllEnums(java.lang.Class enumClass)
Get all so far registered enumeration instances of the given enumeration class. |
static java.util.List |
getAllEnumsInherited(java.lang.Class enumClass)
Get all so far registered enumeration instances of the given enumeration class and all sub classes of that class. |
static Enum |
getEnum(java.lang.Class enumClass,
int id)
Get enumeration instance by id of the given enumeration class. |
int |
getEnumId()
Get id of the enumeration instance. |
static Enum |
getEnumInherited(java.lang.Class enumClass,
int id)
Get enumeration instance by id of the given enumeration class and all sub classes of that class. |
int |
hashCode()
Get hashcode for this enumeration instance. |
java.lang.String |
toString()
Get descriptive text for this enumeration instance. |
| Methods inherited from class com.sap.netweaver.bc.rf.util.flyweight.FlyWeight |
getAllFlyWeights, getAllFlyWeightsInherited, getFlyWeight, getFlyWeightId, getFlyWeightInherited, removeAllFlyWeights, removeAllFlyWeightsInherited, removeFlyWeight, removeFlyWeightInherited |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
protected Enum(int id,
boolean ignoreDuplicateRegistration)
id - enumeration idignoreDuplicateRegistration - when true, don't throw
IllegalArgumentException exception when the id is already in use| Method Detail |
public final int getEnumId()
public java.lang.String toString()
toString in class FlyWeightpublic final int hashCode()
hashCode in class FlyWeightpublic final boolean equals(java.lang.Object obj)
equals in class FlyWeightobj - object to be compared againstpublic final java.lang.Object clone()
clone in class FlyWeightpublic final int compareTo(java.lang.Object obj)
compareTo in interface java.lang.Comparableobj - object to be compared against
public static final Enum getEnum(java.lang.Class enumClass,
int id)
enumClass - enumeration classid - enumeration id
public static final Enum getEnumInherited(java.lang.Class enumClass,
int id)
enumClass - enumeration classid - enumeration idpublic static java.util.List getAllEnums(java.lang.Class enumClass)
enumClass - enumeration classpublic static java.util.List getAllEnumsInherited(java.lang.Class enumClass)
enumClass - enumeration class
|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||