java.io.Serializable
AbstractLogger.Level
, Action
, ActionDataType
, ActionType
, ActorType
, AddressInfoType
, AddressStatusInfoType
, AddressType
, AgentStateChangeOperation
, AgentWorkMode
, AlarmCause
, AlarmStatus
, ApplicationExecutionMode
, ApplicationStatus
, CallbackType
, CallInfoType
, CallResult
, CallState
, CallType
, CallType
, CampaignActions
, CampaignMode
, CampaignStatus
, Cause
, CfgAccessGroupType
, CfgActionCodeType
, CfgAlarmCategory
, CfgAppComponentType
, CfgAppType
, CfgBorErrorType
, CfgCallActionCode
, CfgCallMode
, CfgChargeType
, CfgClassType
, CfgCTILinkType
, CfgDataType
, CfgDialMode
, CfgDIDGroupType
, CfgDNGroupType
, CfgDNRegisterFlag
, CfgDNType
, CfgEnumeratorObjectType
, CfgEnumeratorType
, CfgEnumType
, CfgErrorType
, CfgFieldType
, CfgFlag
, CfgFolderClass
, CfgGroupType
, CfgHAType
, CfgHostType
, CfgIVRProfileType
, CfgIVRType
, CfgLanguage
, CfgLanguageLCID
, CfgLinkType
, CfgLocaleDescType
, CfgLocaleDispType
, CfgLocaleExtType
, CfgLocaleNameType
, CfgLocaleOptType
, CfgMediaType
, CfgObjectiveTableType
, CfgObjectProperty
, CfgObjectState
, CfgObjectType
, CfgOperationalMode
, CfgOperationMode
, CfgOptimizationMethod
, CfgOSType
, CfgPackCodeType
, CfgPermissions
, CfgPersonType
, CfgRank
, CfgRecActionCode
, CfgResourceType
, CfgRouteType
, CfgScriptType
, CfgSelectionMode
, CfgSolutionType
, CfgStartupType
, CfgStatDayType
, CfgStatTableType
, CfgStructureType
, CfgSwitchType
, CfgTableType
, CfgTargetType
, CfgTaskType
, CfgTraceMode
, CfgTransactionType
, CfgUpdatePackageStatus
, ChainAttribute
, ChannelState
, ClientType
, ConnectionState
, ControlMode
, ControlObjectType
, DataStreamType
, DialMode
, DnActions
, DNRole
, ErrorCode
, ErrorCode
, ErrorCodes
, Errors
, Errors
, Errors
, Errors
, Errors
, EventType
, ForwardMode
, GctiCallState
, GctiContactType
, GctiRecordStatus
, GctiRecordType
, GroupCampaignStatus
, HostStatus
, InteractionClient
, InteractionOperation
, InteractionState
, IxnQActions
, KeyFlags
, LocationInfoType
, LogCategory
, LogDataFormat
, LogLevel
, MakeCallType
, MediaActions
, MediaState
, MediaType
, MediaType
, MergeType
, MessagePriority
, MessageTypes
, MonitorNextCallType
, MsgCheck
, MsgCheck
, NamedGEnum
, NetworkCallState
, NetworkDestState
, NetworkPartyRole
, NoticeType
, NotificationMode
, OptimizationMethod
, PartyState
, PartyType
, PhoneType
, ProcessingStatus
, ProtocolType
, RecordStatus
, RecordType
, RegisterMode
, RegModeMask
, Reliability
, RequestResult
, RoutePointActions
, RouteType
, RoutingPointStatus
, ServerRole
, SessionStatus
, SetOpType
, SolutionStatus
, StatisticCategory
, StatisticInterval
, StatisticObjectType
, StatisticProfile
, StatisticSubject
, StatisticUsage
, Status
, Status
, SubscriptionOperationType
, SwitchInfoType
, TargetType
, TenantActions
, TokenType
, TreatAs
, TreatAs
, Treatment
, TreatmentType
, UserStatus
, UserType
, UserType
, Visibility
, VisibilityMode
, WarmStandbyState
, WorkbinContentOperation
, WorkbinType
, XRouteType
public abstract class GEnum
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field | Description |
---|---|---|
protected static java.util.Locale |
LOCALE_ENGLISH |
Modifier | Constructor | Description |
---|---|---|
protected |
GEnum(int ordinal,
java.lang.String name,
java.lang.Class enumClass) |
Creates enumeration value.
|
Modifier and Type | Method | Description |
---|---|---|
java.lang.Integer |
asInteger() |
Returns Integer value of the enumeration member.
|
static int |
enumSize(java.lang.Class enumClass) |
Returns size (count of values) for the given enumeration
(specified by enumClass).
|
boolean |
equals(GEnum e1,
GEnum e2) |
Deprecated.
|
boolean |
equals(java.lang.Object obj) |
|
protected static <E extends GEnum> |
getEnumMap(java.lang.Class<E> enumClass) |
|
protected static <E extends GEnum> |
getEnumValues(java.lang.Class<E> enumClass) |
|
static GEnum |
getValue(java.lang.Class enumClass,
int ordinal) |
Returns enumeration value with specified ordinal value or null if no
such value exists.
|
static GEnum |
getValue(java.lang.Class enumClass,
java.lang.Integer ordinal) |
Returns enumeration value with specified ordinal value or null if no
such value exists.
|
static GEnum |
getValue(java.lang.Class enumClass,
java.lang.String name) |
Returns enumeration value with specified name or null if no
such value exists.
|
int |
hashCode() |
|
java.lang.String |
name() |
Returns name of the enumeration member.
|
int |
ordinal() |
Returns the enumeration value as an integer.
|
protected java.lang.Object |
readResolve() |
|
java.lang.String |
toString() |
|
static <E extends GEnum> |
valueOf(java.lang.Class<E> enumClass,
int ordinal) |
Returns enumeration value by given ordinal number.
|
static <E extends GEnum> |
valueOf(java.lang.Class<E> enumClass,
java.lang.String name) |
Returns enumeration value with specified name or null if no
such value exists.
|
static java.util.Collection |
values(java.lang.Class enumClass) |
Returns all values of the given (specified by enumClass) enumeration.
|
static <E extends GEnum> |
valuesBy(java.lang.Class<E> enumClass) |
Returns all values of the given (specified by enumClass) enumeration.
|
protected GEnum(int ordinal, java.lang.String name, java.lang.Class enumClass)
class MyEnum extends GEnum {
public static final MyEnum BLACK = new MyEnum(0, "Black");
public static final MyEnum WHITE = new MyEnum(1, "White");
private MyEnum(final int ordinal, final String name) {
super(ordinal, name, MyEnum.class);
}
}
ordinal
- ordinal value of the enumeration optionname
- name of the enumeration optionenumClass
- class of the enumerationpublic int ordinal()
public java.lang.String name()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public static java.util.Collection values(java.lang.Class enumClass)
enumClass
- actual class of the enumerationjava.lang.NullPointerException
- if given enumClass is nulljava.lang.IllegalArgumentException
- if enumClass is not enumerationvaluesBy(Class)
public static <E extends GEnum> E valueOf(java.lang.Class<E> enumClass, int ordinal)
enumClass
- actual class of the enumerationordinal
- ordinal number of the enumeration valuepublic static <E extends GEnum> E valueOf(java.lang.Class<E> enumClass, java.lang.String name)
enumClass
- actual class of the enumerationname
- name of value in the enumerationpublic static <E extends GEnum> java.util.Collection<E> valuesBy(java.lang.Class<E> enumClass)
enumClass
- actual class of the enumerationpublic static int enumSize(java.lang.Class enumClass)
enumClass
- actual class of the enumerationjava.lang.IllegalArgumentException
- if enumClass is not enumerationpublic static GEnum getValue(java.lang.Class enumClass, java.lang.Integer ordinal)
enumClass
- actual class of the enumerationordinal
- order of value in the enumerationjava.lang.IllegalArgumentException
- if enumClass is not enumerationvalueOf(Class, int)
public static GEnum getValue(java.lang.Class enumClass, int ordinal)
enumClass
- actual class of the enumerationordinal
- order of value in the enumerationjava.lang.IllegalArgumentException
- if enumClass is not enumerationvalueOf(Class, int)
public static GEnum getValue(java.lang.Class enumClass, java.lang.String name)
enumClass
- actual class of the enumerationname
- name of value in the enumerationjava.lang.IllegalArgumentException
- if enumClass is not enumerationvalueOf(Class, String)
public java.lang.Integer asInteger()
ordinal()
method.ordinal()
protected static <E extends GEnum> java.util.Map<java.lang.Object,E> getEnumMap(java.lang.Class<E> enumClass)
protected static <E extends GEnum> java.util.Set<E> getEnumValues(java.lang.Class<E> enumClass)
protected java.lang.Object readResolve() throws java.io.ObjectStreamException
java.io.ObjectStreamException
Send comments on this topicTechpubs.webadmin@genesys.com.
Document version: 9.0.006.00
Copyright © 2006–2019 Genesys Telecommunications Laboratories, Inc. All rights reserved.