All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class de.tudarmstadt.ito.utils.TokenList

java.lang.Object
   |
   +----de.tudarmstadt.ito.utils.TokenList

public class TokenList
extends Object
Manages a list of tokens.


Constructor Index

 o TokenList(String[], int[])
Construct a TokenList without a default.
 o TokenList(String[], int[], int)
Construct a TokenList with a default.

Method Index

 o getToken(String)
Get the token value for a particular name.
 o getToken(String, int)
Get the token value for a particular name, overriding the default value if necessary.

Constructors

 o TokenList
 public TokenList(String names[],
                  int tokens[])
Construct a TokenList without a default.

Parameters:
names - Token names.
tokens - Token values.
 o TokenList
 public TokenList(String names[],
                  int tokens[],
                  int listDefault)
Construct a TokenList with a default.

Parameters:
names - Token names.
tokens - Token values.
listDefault - Default value (returned when a name is not found).

Methods

 o getToken
 public int getToken(String name,
                     int overrideDefault)
Get the token value for a particular name, overriding the default value if necessary.

Parameters:
name - Token name.
overrideDefault - The temporary default value.
Returns:
The token value or overrideDefault if the name is not found.
 o getToken
 public int getToken(String name)
Get the token value for a particular name.

Parameters:
name - Token name.
Returns:
The token value or the list default if the name is not found. If no list default has been set, 0 is returned.

All Packages  Class Hierarchy  This Package  Previous  Next  Index