Main Page   Packages   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

Enumerated Class Reference

Inheritance diagram for Enumerated:
[legend]
Collaboration diagram for Enumerated:
[legend]
List of all members.

Public Methods

Constant add (String name)
Constant add (String name, int value)
void apply (TypeSwitch sw, Object o)
boolean compatibleWith (Type type)
boolean containsValue (Object value)
Expr defaultVal ()
boolean equals (Object o)
Vector getConstants ()
int getEnumeratedSize ()
int getFirstElement ()
String getNameOf (int value)
int getValueOf (String name)
boolean isKind (int kind)
String toString ()

Private Attributes

int minElement
int maxElement
Hashtable elementName = new Hashtable()
Hashtable elementValue = new Hashtable()
Vector constants = new Vector()

Detailed Description

An enumerated type---essentially a set of named integer constants.

Definition at line 44 of file Enumerated.java.


Member Function Documentation

Constant Enumerated::add String   name,
int   value
[inline]
 

Add a new enumeration constant with a given value.

Parameters:
name   name of constant
value   of constant
Returns:
Constant definition

Definition at line 72 of file Enumerated.java.

Constant Enumerated::add String   name [inline]
 

Add a new enumeration constant (value automatically assigned to be 1 greater than existing maximum).

Parameters:
name   name of constant
Returns:
Constant definition

Definition at line 59 of file Enumerated.java.

boolean Enumerated::equals Object   o [inline]
 

Returns:
boolean
Parameters:
otherType   java.lang.Object

Reimplemented from Type.

Definition at line 100 of file Enumerated.java.

Vector Enumerated::getConstants   [inline]
 

Get Vector of enumeration Constant's.

Returns:
Vector of Constant objects for enumerated type

Definition at line 115 of file Enumerated.java.

Referenced by SmvTypeDecl::caseEnumerated().

int Enumerated::getEnumeratedSize   [inline]
 

Get size of enumerated type---this is not the number of constants but rather the range of those constants (e.g., size {0,1,4} = 5 ).

Returns:
size of type.

Definition at line 122 of file Enumerated.java.

Referenced by SmvTypeDecl::caseEnumerated().

String Enumerated::toString   [inline]
 

Returns:
Type string, e.g. `int[]'

Reimplemented from Type.

Definition at line 140 of file Enumerated.java.


The documentation for this class was generated from the following file:
Generated at Thu Feb 7 07:10:22 2002 for Bandera by doxygen1.2.10 written by Dimitri van Heesch, © 1997-2001