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.
-
TokenList(String[], int[])
- Construct a TokenList without a default.
-
TokenList(String[], int[], int)
- Construct a TokenList with a default.
-
getToken(String)
- Get the token value for a particular name.
-
getToken(String, int)
- Get the token value for a particular name, overriding the default value
if necessary.
TokenList
public TokenList(String names[],
int tokens[])
- Construct a TokenList without a default.
- Parameters:
- names - Token names.
- tokens - Token values.
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).
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.
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