ilog.util
Class IlEnum

java.lang.Object
  extended by ilog.util.IlEnum
Direct Known Subclasses:
IlEventType, IlpAttachmentLocation, IlpDirection, IlpExpansionType, IlpGesture, IlpKey, IlpObjectFrameType, IlpPositionSource, IlpSelectionFocusMode, IlpSortingMode, IlpTableResizeMode, IlpTableSelectionMode, IltAlarm.AbstractSeverity, IltAlarm.AlarmType, IltAlarm.ProbableCause, IltAlarm.TrendIndication, IltAlarmStateEnum, IltBaseStyle, IltBTS.Type, IltBTSAntenna.Type, IltCardItem.Type, IltDecorationType, IltDetailLevel, IltGraphicElementName, IltKey, IltLabelLayoutConstants, IltLink.Media, IltLink.Technology, IltLink.Type, IltLinkPort, IltNetworkElement.Family, IltNetworkElement.Function, IltNetworkElement.Type, IltObject.LogicalType, IltObject.TinyType, IltOffPageConnector.Type, IltShelf.Type, IltShelfItem.Type, IltShortcutAttributeType, IltSONET.End, IltTrap.Type

public abstract class IlEnum
extends Object

This is the parent class of all symbolic enumeration classes. To declare an enumeration C, declare a class C as follows: class C extends IlEnum { public static C c1; ... public static C cn; public static IlEnumInfo metainfo = new IlEnumInfo(c.lass); } The call to the IlEnumInfo class will perform all the necessary magic to assign distinct values to c1, ..., cn.

Note: If you define a subclass D of C, the enum tags defined in D will be listed in C.metainfo.elements(), although they are not statically accessible as fields in class C.

The enum tags may have a name. The name is usually the same as the name of field in the enum class.

If you want to access an element from the enumeration by its name, you can use the IlEnumInfo.get(String name) method. To get the IlEnumInfo instance corresponding to your IlEnum, you can use the method IlEnumInfo.FromClass(Class class).

Since:
JTGO 3.0
See Also:
IlEnumInfo

Field Summary
static IlEnumInfo metainfo
          Contains metainformation about this IlEnum class.
 
Constructor Summary
protected IlEnum()
          Constructor
 
Method Summary
 String getName()
          Returns the name of this enumeration tag.
 IlEnum intern()
          Returns a canonical representation for this object.
protected  void setName(String name)
          Sets the name of this enumeration tag.
 String toString()
          Returns the String representation of this IlEnum's values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

metainfo

public static final IlEnumInfo metainfo
Contains metainformation about this IlEnum class.

Internal method or field: do not use!
Constructor Detail

IlEnum

protected IlEnum()
Constructor

Method Detail

getName

public String getName()
Returns the name of this enumeration tag.


setName

protected void setName(String name)
Sets the name of this enumeration tag. This is meant to be called by constructors of subclasses only.


intern

public IlEnum intern()
Returns a canonical representation for this object.

Internal method or field: do not use!

toString

public String toString()
Returns the String representation of this IlEnum's values.

By default, the string representation is the IlEnum name value. Used in the table to represent the enum value so cannot be changed without implying a change in the Table look-and-feel.

Overrides:
toString in class Object


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.   . All Rights Reserved.