|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.util.Dictionary
|
+--java.util.Hashtable
|
+--elge.lexikon.Lexikon
This instance performs very simple implementation of the aganet lexikon, only as an association table.
Word,
Serialized Form| Field Summary | |
static Integer |
DEFAULT_LENGTH
default length of words |
protected char[] |
lexems
the chars to create the words from. |
protected Class |
wordClass
|
protected Integer |
wordLength
the length of world to use. |
| Constructor Summary | |
Lexikon()
Creates a new instance of Lexikon |
|
Lexikon(int wordLength)
Creates a new instance of Lexikon |
|
Lexikon(Integer wordLength)
Creates a new instance of Lexikon |
|
| Method Summary | |
void |
addNameObject(Object obj,
Word w)
Like name object, but only adds the word. if it already exists, it does nothing (like increasing the use or success) |
Word |
createWord()
Creates a word with a length specified for the lexikon. |
Word |
createWord(double p)
Creates a random word with probability of p |
Word |
createWord(Integer length)
Creates a word of length of the param. |
Word |
existName(Object obj,
Word w)
return a not null value, if there is a name equal with the param w for referent obj. |
protected char[] |
getLexems()
returns the lexems. |
Word |
getMostSucessfullObjectName(Object obj)
Returns the most sucessful object name. |
Vector |
getObjectNames(Object obj)
Returns all words associatedwith the given object |
Vector |
getObjectsForWord(Word w)
Returns all associated objects with a given word. |
Class |
getWordClass()
|
boolean |
incSucess(Object obj,
Word w)
Increases the success of association if it is found. |
void |
nameObject(Object obj,
Word w)
names object obj, with word w? |
void |
setWordClass(Class cls)
|
void |
sucessGame(Object obj,
Word w)
increase the use and sucess. |
| Methods inherited from class java.util.Hashtable |
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final Integer DEFAULT_LENGTH
protected Class wordClass
protected char[] lexems
protected Integer wordLength
| Constructor Detail |
public Lexikon()
public Lexikon(int wordLength)
wordLength - the world length to use when creating new words.public Lexikon(Integer wordLength)
wordLength - the world length to use when creating new words.| Method Detail |
public void setWordClass(Class cls)
public Class getWordClass()
protected char[] getLexems()
public Word createWord(Integer length)
length - length of the world.
public Word createWord()
public Word createWord(double p)
p
p - probability from 0 to 1
public void nameObject(Object obj,
Word w)
obj - object to namew - word to assign to the object
public void addNameObject(Object obj,
Word w)
obj - object to be namedw - word to assign to the object
public Word existName(Object obj,
Word w)
obj - object that is namedw - the name of the object
public boolean incSucess(Object obj,
Word w)
obj - objectw - word
public void sucessGame(Object obj,
Word w)
obj - objectw - wordpublic Vector getObjectNames(Object obj)
obj - object
public Vector getObjectsForWord(Word w)
w - Word
public Word getMostSucessfullObjectName(Object obj)
obj - Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||