| java.lang.Object henplus.view.util.SortedMatchIterator
SortedMatchIterator | public class SortedMatchIterator implements Iterator(Code) | | An Iterator returning end-truncated matching values from
a sorted List.
This Iterator is initialized with a sorted Set, sorted Map or another
Iterator that must be placed at the beginning of the matching
area of a sorted set.
This Iterator is commonly used for TAB-completion..
|
Constructor Summary | |
public | SortedMatchIterator(String partialMatch, Iterator it) Return all Key-Elements from the given Iterator that have the common
prefix given in 'partialMatch'. | public | SortedMatchIterator(String partialMatch, SortedSet set) Return all Key-Elements from the given SortedSet that have the common
prefix given in 'partialMatch'. | public | SortedMatchIterator(String partialMatch, SortedMap map) Return all Key-Elements from the given SortedMap that have the common
prefix given in 'partialMatch'. |
Method Summary | |
protected boolean | exclude(String current) Override this method if you want to exclude
certain values from the iterated values returned. | public boolean | hasNext() | public Object | next() | public void | remove() | public void | setPrefix(String prefix) If a prefix is set, then return the matching element with
with this prefix prepended. | public void | setSuffix(String suffix) If a suffix is set, then return the matching element with
with this suffix appended. |
SortedMatchIterator | public SortedMatchIterator(String partialMatch, Iterator it)(Code) | | Return all Key-Elements from the given Iterator that have the common
prefix given in 'partialMatch'. The Iterator must provide a sorted
sequence of the potential matches that is placed on the first match.
Parameters: partialMatch - the prefix that should match Parameters: it - the Iterator positioned at the first partial match. |
SortedMatchIterator | public SortedMatchIterator(String partialMatch, SortedSet set)(Code) | | Return all Key-Elements from the given SortedSet that have the common
prefix given in 'partialMatch'.
Parameters: partialMatch - the prefix that should match Parameters: set - the SortedSet from which the matches should be iterated. |
SortedMatchIterator | public SortedMatchIterator(String partialMatch, SortedMap map)(Code) | | Return all Key-Elements from the given SortedMap that have the common
prefix given in 'partialMatch'.
Parameters: partialMatch - the prefix that should match Parameters: map - the SortedMap from its matching keys the matches should be iterated. |
exclude | protected boolean exclude(String current)(Code) | | Override this method if you want to exclude
certain values from the iterated values returned.
By default, no value is excluded.
|
hasNext | public boolean hasNext()(Code) | | |
remove | public void remove()(Code) | | |
setPrefix | public void setPrefix(String prefix)(Code) | | If a prefix is set, then return the matching element with
with this prefix prepended.
|
setSuffix | public void setSuffix(String suffix)(Code) | | If a suffix is set, then return the matching element with
with this suffix appended.
|
|
|