|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.penguinwerks.jodene.data.Translator
The translator takes a string and returns a set of values, which are a function of the input. Normally this is used with non-numeric inputs, such as color, that are encoded using N-1 or K classes. See KClassTranslator and NMinusOneClassTranslator as concrete examples.
| Constructor Summary | |
Translator()
|
|
| Method Summary | |
void |
addKey(java.lang.String keyName)
Adds a new key to translate - note that all necessary keys must be defined in the translator. |
abstract int |
getOutputSize()
Abstract method that returns the size of an encoded class. |
abstract double[] |
translate(java.lang.String values)
The abstract translation function. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Translator()
| Method Detail |
public abstract double[] translate(java.lang.String values)
throws TranslatorException
values - The raw string
TranslatorException - Thrown if there is an error in translation.public void addKey(java.lang.String keyName)
keyName - The name of the class to translate.public abstract int getOutputSize()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||