All Packages Class Hierarchy This Package Previous Next Index
Class org.xmlmiddleware.utils.TokenList
java.lang.Object
|
+----org.xmlmiddleware.utils.TokenList
- public class TokenList
- extends Object
Manages a list of tokens.
- Version:
- 2.0
- Author:
- Ronald Bourret, 1998-9, 2001
- See Also:
- InvertedTokenList
-
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 defaultToken)
- Construct a TokenList with a default.
- Parameters:
- names - Token names.
- tokens - Token values.
- defaultToken - 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