org.objectweb.jac.util
Class Enum

java.lang.Object
  |
  +--org.objectweb.jac.util.Enum

public class Enum
extends Object


Constructor Summary
Enum(String[] values, int start, int step)
           
 
Method Summary
 int getStart()
           
 int getStep()
           
 List getValues()
           
 String int2string(int index)
          Converts an integer value to it's string representation
 int string2int(String string)
          Converts a string value to an integer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Enum

public Enum(String[] values,
            int start,
            int step)
Method Detail

int2string

public String int2string(int index)
Converts an integer value to it's string representation

Parameters:
index - the integer value to convert
Throws:
InvalidIndexException

string2int

public int string2int(String string)
Converts a string value to an integer. Throws an exception if the enum does not define that string.


getValues

public List getValues()

getStart

public int getStart()

getStep

public int getStep()