public class AutoCompletionSet extends java.util.TreeSet<AutoCompletionItem>
AutoCompletionItem
s.
Items are sorted with higher priority first, then according to lexicographic order
on the value of the AutoCompletionListItem
.gui.tagging.ac.AutoCompletionList
)Modifier and Type | Field and Description |
---|---|
private java.util.Set<java.lang.String> |
values |
Constructor and Description |
---|
AutoCompletionSet() |
Modifier and Type | Method and Description |
---|---|
boolean |
add(AutoCompletionItem e) |
boolean |
addAll(java.util.Collection<java.lang.String> values,
AutoCompletionPriority priority)
Adds a list of strings to this list.
|
boolean |
addUserInput(java.util.Collection<java.lang.String> values)
Adds values that have been entered by the user.
|
void |
clear() |
boolean |
contains(java.lang.String value)
Checks whether an item with the given value is already in the list.
|
boolean |
remove(java.lang.Object o) |
boolean |
remove(java.lang.String key)
Removes the auto completion item with key
key |
addAll, ceiling, clone, comparator, contains, descendingIterator, descendingSet, first, floor, headSet, headSet, higher, isEmpty, iterator, last, lower, pollFirst, pollLast, size, spliterator, subSet, subSet, tailSet, tailSet
containsAll, retainAll, toArray, toArray, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
private final java.util.Set<java.lang.String> values
public AutoCompletionSet()
public boolean add(AutoCompletionItem e)
add
in interface java.util.Collection<AutoCompletionItem>
add
in interface java.util.Set<AutoCompletionItem>
add
in class java.util.TreeSet<AutoCompletionItem>
public boolean remove(java.lang.Object o)
remove
in interface java.util.Collection<AutoCompletionItem>
remove
in interface java.util.Set<AutoCompletionItem>
remove
in class java.util.TreeSet<AutoCompletionItem>
public void clear()
clear
in interface java.util.Collection<AutoCompletionItem>
clear
in interface java.util.Set<AutoCompletionItem>
clear
in class java.util.TreeSet<AutoCompletionItem>
public boolean addAll(java.util.Collection<java.lang.String> values, AutoCompletionPriority priority)
values
- a list of strings to addpriority
- the priority to usetrue
if this set changed as a result of the callpublic boolean addUserInput(java.util.Collection<java.lang.String> values)
values
- values that have been entered by the usertrue
if this set changed as a result of the callpublic boolean contains(java.lang.String value)
value
- the value of an auto completion itempublic boolean remove(java.lang.String key)
key
key
- the keytrue
if an element was removed