Class sunsoft.jws.visual.rt.type.BaseEnumHelper
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sunsoft.jws.visual.rt.type.BaseEnumHelper

java.lang.Object
   |
   +----sunsoft.jws.visual.rt.type.BaseEnumHelper

public class BaseEnumHelper
extends Object
Keeps track of the string/int pairs in sub-classes of BaseEnum. This is meant to be a class-wide member for each subclass of BaseEnum. Each subclass of BaseEnum should provide a single instance of BaseEnumHelper for use by all instances of that subclass.
See Also:
BaseEnum

Constructor Index

 o BaseEnumHelper()

Method Index

 o add(int, String)
Adds a new string/int pair to the internal hashtable.
 o descriptions()
Returns an array containing all of the String descriptions available in this enum.
 o elements()
Returns an Enumeration of the String descriptions available in this enum.
 o getDefaultChoice()
Gets the default choice for newly constructed instances of the enum.
 o getInteger(String)
Returns the Integer associated with a String key.
 o getString(Integer)
Returns the String associated with an Integer key.
 o isValid(int)
Returns true if the choice is valid for this enum type.
 o isValid(String)
Returns true if the choice is valid for this enum type.
 o setDefaultChoice(int)
Sets the default choice for newly constructed instances of the enum.

Constructors

 o BaseEnumHelper
  public BaseEnumHelper()

Methods

 o setDefaultChoice
  public void setDefaultChoice(int value)
Sets the default choice for newly constructed instances of the enum.
 o getDefaultChoice
  public int getDefaultChoice()
Gets the default choice for newly constructed instances of the enum.
 o add
  public void add(int value,
                  String name)
Adds a new string/int pair to the internal hashtable.
 o isValid
  public boolean isValid(int choice)
Returns true if the choice is valid for this enum type.
 o isValid
  public boolean isValid(String choice)
Returns true if the choice is valid for this enum type.
 o getInteger
  public Integer getInteger(String key)
Returns the Integer associated with a String key.
 o getString
  public String getString(Integer key)
Returns the String associated with an Integer key.
 o elements
  public Enumeration elements()
Returns an Enumeration of the String descriptions available in this enum.
 o descriptions
  public String[] descriptions()
Returns an array containing all of the String descriptions available in this enum.

All Packages  Class Hierarchy  This Package  Previous  Next  Index