|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jakubholy.jedit.autocomplete.WordListTreeSet
public class WordListTreeSet
A WordList implementation based on java.util.TreeSet (which implements OrderedSet). It is synchronized.
Field Summary | |
---|---|
protected java.util.TreeSet<net.jakubholy.jedit.autocomplete.Completion> |
treeSet
|
Constructor Summary | |
---|---|
WordListTreeSet()
|
Method Summary | |
---|---|
boolean |
add(net.jakubholy.jedit.autocomplete.Completion completion)
Insert the completion into the list. |
void |
addAll(net.jakubholy.jedit.autocomplete.Completion[] completions)
|
void |
addObserver(java.util.Observer o)
Add an observer interested in receiving WordListEvent s whenever
the contents of this word list changes (completion added/removed, cleared). |
void |
clear()
Removes all of the elements from this wordList. |
boolean |
containes(net.jakubholy.jedit.autocomplete.Completion completion)
Return true if is in the list. |
void |
deleteObserver(java.util.Observer o)
Stop observing this word list. |
net.jakubholy.jedit.autocomplete.Completion[] |
getAllWords()
Returns all words in the list in a sorted array. |
net.jakubholy.jedit.autocomplete.Completion[] |
getCompletions(java.lang.String prefix)
Return an array of all words in the list starting with the given prefix and longer than that prefix. |
boolean |
remove(net.jakubholy.jedit.autocomplete.Completion completion)
Removes the specified element from this wordList if it is present. |
int |
size()
Returns the number of elements in this wordlist. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.TreeSet<net.jakubholy.jedit.autocomplete.Completion> treeSet
Constructor Detail |
---|
public WordListTreeSet()
Method Detail |
---|
public net.jakubholy.jedit.autocomplete.Completion[] getCompletions(java.lang.String prefix)
WordList
getCompletions
in interface WordList
prefix
- The prefix whose completions we search; at least 1 letter.
public net.jakubholy.jedit.autocomplete.Completion[] getAllWords()
WordList
getAllWords
in interface WordList
public boolean add(net.jakubholy.jedit.autocomplete.Completion completion)
WordList
add
in interface WordList
public boolean remove(net.jakubholy.jedit.autocomplete.Completion completion)
WordList
remove
in interface WordList
public void clear()
WordList
clear
in interface WordList
public void addAll(net.jakubholy.jedit.autocomplete.Completion[] completions)
addAll
in interface WordList
public int size()
WordList
size
in interface WordList
public boolean containes(net.jakubholy.jedit.autocomplete.Completion completion)
WordList
containes
in interface WordList
public void addObserver(java.util.Observer o)
WordList
WordListEvent
s whenever
the contents of this word list changes (completion added/removed, cleared).
addObserver
in interface WordList
public void deleteObserver(java.util.Observer o)
WordList
deleteObserver
in interface WordList
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |