ca.odell.glazedlists.matchers
Class SetMatcherEditor<E,O>

java.lang.Object
  extended by ca.odell.glazedlists.matchers.AbstractMatcherEditorListenerSupport<E>
      extended by ca.odell.glazedlists.matchers.AbstractMatcherEditor<E>
          extended by ca.odell.glazedlists.matchers.SetMatcherEditor<E,O>
Type Parameters:
E - type of list elements
O - type of match set
All Implemented Interfaces:
MatcherEditor<E>

public final class SetMatcherEditor<E,O>
extends AbstractMatcherEditor<E>

A 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:

See Also:
#create(Mode, Function), setMatchSet(Set), SetMatcherEditor.Mode

Nested Class Summary
static class SetMatcherEditor.Mode
          Supported modes of operation for the MatcherEditor.
 
Nested classes/interfaces inherited from interface ca.odell.glazedlists.matchers.MatcherEditor
MatcherEditor.Event<E>, MatcherEditor.Listener<E>
 
Method Summary
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(Set<O> newSet)
          Sets a new match set which triggers a refiltering.
 
Methods inherited from class ca.odell.glazedlists.matchers.AbstractMatcherEditor
fireChanged, fireConstrained, fireMatchAll, fireMatchNone, fireRelaxed, getMatcher, isCurrentlyMatchingAll, isCurrentlyMatchingNone
 
Methods inherited from class ca.odell.glazedlists.matchers.AbstractMatcherEditorListenerSupport
addMatcherEditorListener, createChangedEvent, createConstrainedEvent, createMatchAllEvent, createMatchNoneEvent, createRelaxedEvent, fireChangedMatcher, removeMatcherEditorListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public 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.

Parameters:
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)
Returns:
the constructed MatcherEditor s
See Also:
SetMatcherEditor.Mode

setMatchSet

public void setMatchSet(Set<O> newSet)
Sets a new match set which triggers a refiltering.

Parameters:
newSet - the new match set (!= null)


Glazed Lists, Copyright © 2003 publicobject.com, O'Dell Engineering.
Documentation build by hbrands at 2017-03-13 22:58