All Packages Class Hierarchy This Package Previous Next Index
Class org.xmlmiddleware.utils.InvertedTokenList
java.lang.Object
|
+----org.xmlmiddleware.utils.InvertedTokenList
- public class InvertedTokenList
- extends Object
An inverted token list is used to find the name associated with a token.
- Version:
- 2.0
- Author:
- Ronald Bourret, 1998-9, 2001
- See Also:
- TokenList
-
InvertedTokenList(int[], String[])
- Construct an InvertedTokenList without a default.
-
InvertedTokenList(int[], String[], String)
- Construct an InvertedTokenList with a default.
-
getTokenName(int)
- Get the name for a particular token.
-
getTokenName(int, String)
- Get the name for a particular token, overriding the default value
if necessary.
InvertedTokenList
public InvertedTokenList(int tokens[],
String names[])
- Construct an InvertedTokenList without a default.
- Parameters:
- tokens - Token values.
- names - Token names.
InvertedTokenList
public InvertedTokenList(int tokens[],
String names[],
String defaultName)
- Construct an InvertedTokenList with a default.
- Parameters:
- tokens - Token values.
- names - Token names.
- defaultName - Default value (returned when a token is not found).
getTokenName
public String getTokenName(int token,
String overrideDefault)
- Get the name for a particular token, overriding the default value
if necessary.
- Parameters:
- token - The token.
- overrideDefault - The temporary default value.
- Returns:
- The token name or overrideDefault if the name is not found.
getTokenName
public String getTokenName(int token)
- Get the name for a particular token.
- Parameters:
- token - The token.
- Returns:
- The token name or the list default if the token is not found.
If no list default has been set, null is returned.
All Packages Class Hierarchy This Package Previous Next Index