|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.topologi.diffx.event.lang.Repertory
A repertory of words.
Use this class to store word events in order to avoid creating new instances.
| Constructor Summary | |
Repertory()
Creates a new repertoire. |
|
| Method Summary | |
boolean |
contains(String word)
Returns the true if this repertory contains the specified word. |
WordEvent |
get(String word)
Returns the WordEvent corresponding to the specified word. |
void |
put(String word)
Adds a new word to this repertory. |
int |
size()
Returns the number of words in the repertory. |
WordEvent |
update(String word)
Returns the WordEvent corresponding to the specified word. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Repertory()
| Method Detail |
public void put(String word)
word - The word to be added.public WordEvent get(String word)
WordEvent corresponding to the specified word.
word - The word to be retrieved.
WordEvent or null.public WordEvent update(String word)
WordEvent corresponding to the specified word.
This method will add the word to the repertory if it does not already exist.
word - The word to be added and retrieved.
WordEvent.public boolean contains(String word)
true if this repertory contains the specified word.
word - The word to be searched.
true if this repertory contains the word;
false otherwise.public int size()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||