Classifier
Class TokenRepository
java.lang.Object
|
+--Classifier.TokenRepository
- public final class TokenRepository
- extends java.lang.Object
The TokenRepository class is used to store the set of all Tokens used by the LCS
All tokens are created once and for all so as to prevent
the extensive use of "new".
They are static so that every class can access them easily
Any comparison between token is made just through their addresses
It would be nice if this class could be made local to the package Classifier
i.e. remove "public" in the class declaration
So far, it is not possible because init is called from outside...
- Author:
- Olivier Sigaud and Pierre Gérard.
Method Summary |
static Classifier.Token[] |
getSpecializedSet()
|
static Classifier.Token |
getToken(byte val)
|
static Classifier.Token |
getToken(java.lang.String string)
|
static void |
init(byte nbSpec)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEBUG
public static boolean DEBUG
dontCareToken
public static Classifier.Token dontCareToken
dontChangeToken
public static Classifier.Token dontChangeToken
dontKnowToken
public static Classifier.Token dontKnowToken
isInitialized
private static boolean isInitialized
tokenValues
public static Classifier.Token[] tokenValues
TokenRepository
public TokenRepository()
init
public static void init(byte nbSpec)
- Parameters:
nbSpec
-
getSpecializedSet
public static final Classifier.Token[] getSpecializedSet()
- Returns:
- Classifier.Token[]
getToken
public static final Classifier.Token getToken(java.lang.String string)
- Parameters:
string
-
- Returns:
- Classifier.Token
getToken
public static final Classifier.Token getToken(byte val)
- Parameters:
val
-
- Returns:
- Classifier.Token