ilog.util
Class IlEnumInfo

java.lang.Object
  extended by ilog.util.IlEnumInfo

public class IlEnumInfo
extends Object

Each IlEnumInfo describes a subclass of IlEnum.

Since:
JTGO 3.0
See Also:
IlEnum

Constructor Summary
IlEnumInfo(Class clazz)
          Creates the metainformation for an enum.
IlEnumInfo(Class clazz, boolean initFields)
          Creates the metainformation for an enum.
IlEnumInfo(Class clazz, boolean initFields, boolean forceOwnTable)
          Creates the metainformation for an enum.
 
Method Summary
 void addElement(IlEnum item)
          Adds an element to this enum.
static Enumeration AllEnumInfos()
          Returns an enumeration of all existing enum classes.
 Enumeration elements()
          Returns an enumeration of all existing items.
static IlEnumInfo FromClass(Class clazz)
          Returns the class information for an IlEnum class, given its class.
 IlEnum get(String name)
          Returns the item with a given name, or null if none exists.
 Class getDefiningClass()
          Returns the enum, a subclass of IlEnum.
 boolean has(String name)
          Determines whether an enum has an item with a given name.
 void removeElement(IlEnum item)
          Removes an element from this enum.
 int size()
          Returns the number of items in the element table.
 String toString()
          Returns the String representation of this IlEnumInfo's values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IlEnumInfo

public IlEnumInfo(Class clazz,
                  boolean initFields,
                  boolean forceOwnTable)
Creates the metainformation for an enum.

Parameters:
initFields - if true, public static fields of the correct type and without value will be assigned a value
forceOwnTable - if true, this class will not share its table with its superclass

IlEnumInfo

public IlEnumInfo(Class clazz,
                  boolean initFields)
Creates the metainformation for an enum.

Parameters:
initFields - if true, public static fields of the correct type and without value will be assigned a value

IlEnumInfo

public IlEnumInfo(Class clazz)
Creates the metainformation for an enum. You must pass the IlEnum subclass as first argument. By convention, this metainformation is stored in a static class variable called metainfo.

Method Detail

getDefiningClass

public Class getDefiningClass()
Returns the enum, a subclass of IlEnum.


AllEnumInfos

public static Enumeration AllEnumInfos()
Returns an enumeration of all existing enum classes.

Returns:
an enumeration of IlEnumInfo
Internal method or field: do not use!

FromClass

public static IlEnumInfo FromClass(Class clazz)
Returns the class information for an IlEnum class, given its class.


elements

public Enumeration elements()
Returns an enumeration of all existing items.

Returns:
an enumeration of IlEnum

has

public boolean has(String name)
Determines whether an enum has an item with a given name.


get

public IlEnum get(String name)
Returns the item with a given name, or null if none exists.


size

public int size()
Returns the number of items in the element table.


addElement

public void addElement(IlEnum item)
Adds an element to this enum.


removeElement

public void removeElement(IlEnum item)
Removes an element from this enum.


toString

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

Overrides:
toString in class Object


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