public abstract class Enum extends FlyWeight implements Cloneable, Comparable, Serializable
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 ); } }
Created 20. Januar 2003
Modifier | Constructor and Description |
---|---|
protected |
Enum(int id,
boolean ignoreDuplicateRegistration)
Construct instance of an enumeration.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Clone this enumeration.
|
int |
compareTo(Object obj)
Compare this and another object for order.
|
boolean |
equals(Object obj)
Compare this and another object for equality.
|
static List |
getAllEnums(Class enumClass)
Get all so far registered enumeration instances of the given enumeration
class.
|
static List |
getAllEnumsInherited(Class enumClass)
Get all so far registered enumeration instances of the given enumeration
class and all sub classes of that class.
|
static Enum |
getEnum(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(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.
|
String |
toString()
Get descriptive text for this enumeration instance.
|
getAllFlyWeights, getAllFlyWeightsInherited, getFlyWeight, getFlyWeightId, getFlyWeightInherited, removeAllFlyWeights, removeAllFlyWeightsInherited, removeFlyWeight, removeFlyWeightInherited
protected Enum(int id, boolean ignoreDuplicateRegistration)
id
- enumeration idignoreDuplicateRegistration
- when true, don't throw
IllegalArgumentException exception when the id is already in usepublic final int getEnumId()
public String toString()
public final int hashCode()
public final boolean equals(Object obj)
public final Object clone()
public final int compareTo(Object obj)
compareTo
in interface Comparable
obj
- object to be compared againstpublic static final Enum getEnum(Class enumClass, int id)
enumClass
- enumeration classid
- enumeration idpublic static final Enum getEnumInherited(Class enumClass, int id)
enumClass
- enumeration classid
- enumeration idpublic static List getAllEnums(Class enumClass)
enumClass
- enumeration classpublic static List getAllEnumsInherited(Class enumClass)
enumClass
- enumeration classAccess Rights |
---|
SC | DC | Public Part | ACH |
---|---|---|---|
[sap.com] KMC-CM
|
[sap.com] tc/km/frwk
|
api
|
EP-KM-CM
|
[sap.com] KMC-WPC
|
[sap.com] tc/kmc/wpc/wpcfacade
|
api
|
EP-PIN-WPC-WCM
|
Copyright 2018 SAP AG Complete Copyright Notice