E - type of list elementsO - type of match setpublic final class SetMatcherEditor<E,O> extends AbstractMatcherEditor<E>
MatcherEditor with blacklist or whitelist matching functionality.
To do its work, SetMatcherEditor needs a match set, a function and a mode.
A match set of type O needs to be specified as black- or whitelist. The match set can be set at any time.
The specified function transforms the list elements of type E into type O for comparison with the match set.
The given mode determines the behaviour of the matcher editor:
SetMatcherEditor.Mode.BLACKLIST transformed list elements that are contained in the match set are filtered out.SetMatcherEditor.Mode.WHITELIST_EMPTY_MATCH_ALL transformed list elements that are contained in the match set are matched.
An empty match set matches all elements.SetMatcherEditor.Mode.WHITELIST_EMPTY_MATCH_NONE transformed list elements that are contained in the match set are matched.
An empty match set matches no elements.#create(Mode, Function),
setMatchSet(Set),
SetMatcherEditor.Mode| Modifier and Type | Class and Description |
|---|---|
static class |
SetMatcherEditor.Mode
Supported modes of operation for the MatcherEditor.
|
MatcherEditor.Event<E>, MatcherEditor.Listener<E>| Modifier and Type | Method and Description |
|---|---|
static <E,O> SetMatcherEditor<E,O> |
create(SetMatcherEditor.Mode mode,
FunctionList.Function<E,O> fn)
Creates a
SetMatcherEditor with the specified SetMatcherEditor.Mode and transformation function. |
void |
setMatchSet(java.util.Set<O> newSet)
Sets a new match set which triggers a refiltering.
|
fireChanged, fireConstrained, fireMatchAll, fireMatchNone, fireRelaxed, getMatcher, isCurrentlyMatchingAll, isCurrentlyMatchingNoneaddMatcherEditorListener, createChangedEvent, createConstrainedEvent, createMatchAllEvent, createMatchNoneEvent, createRelaxedEvent, fireChangedMatcher, removeMatcherEditorListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfromMatcherpublic static <E,O> SetMatcherEditor<E,O> create(SetMatcherEditor.Mode mode, FunctionList.Function<E,O> fn)
SetMatcherEditor with the specified SetMatcherEditor.Mode and transformation function.mode - operation mode of the MatcherEditor (!= null)fn - function to extract the value from a list element to be matched against the match set (!= null)SetMatcherEditor.Modepublic void setMatchSet(java.util.Set<O> newSet)
newSet - the new match set (!= null)Glazed Lists, Copyright © 2003 publicobject.com, O'Dell Engineering.
Documentation build by swimmesberger at Wed Feb 13 09:45:20 CET 2019