/** * Convenience constructor for creating a {@link FilterList} and setting its * {@link Matcher}. */ public FilterList(EventList<E> source, Matcher<? super E> matcher) { this(source); // if no matcher was given, we have no further initialization work if (matcher == null) return; currentMatcher = matcher; changed(); }
/** * Convenience constructor for creating a {@link FilterList} and setting its * {@link Matcher}. */ public FilterList(EventList<E> source, Matcher<? super E> matcher) { this(source); // if no matcher was given, we have no further initialization work if (matcher == null) return; currentMatcher = matcher; changed(); }
/** * Convenience constructor for creating a {@link FilterList} and setting its * {@link Matcher}. */ public FilterList(EventList<E> source, Matcher<? super E> matcher) { this(source); // if no matcher was given, we have no further initialization work if (matcher == null) return; currentMatcher = matcher; changed(); }
/** * Convenience constructor for creating a {@link FilterList} and setting its * {@link MatcherEditor}. */ public FilterList(EventList<E> source, MatcherEditor<? super E> matcherEditor) { this(source); // if no matcherEditor was given, we have no further initialization work if (matcherEditor == null) return; currentEditor = matcherEditor; currentEditor.addMatcherEditorListener(listener); currentMatcher = currentEditor.getMatcher(); changed(); }
/** * Convenience constructor for creating a {@link FilterList} and setting its * {@link MatcherEditor}. */ public FilterList(EventList<E> source, MatcherEditor<? super E> matcherEditor) { this(source); // if no matcherEditor was given, we have no further initialization work if (matcherEditor == null) return; currentEditor = matcherEditor; currentEditor.addMatcherEditorListener(listener); currentMatcher = currentEditor.getMatcher(); changed(); }
/** * Convenience constructor for creating a {@link FilterList} and setting its * {@link MatcherEditor}. */ public FilterList(EventList<E> source, MatcherEditor<? super E> matcherEditor) { this(source); // if no matcherEditor was given, we have no further initialization work if (matcherEditor == null) return; currentEditor = matcherEditor; currentEditor.addMatcherEditorListener(listener); currentMatcher = currentEditor.getMatcher(); changed(); }
/** * This method selects an appropriate delegate method to perform the * correct work for each of the possible <code>changeType</code>s. This * method does <strong>NOT</strong> acquire any locks and is thus used * during initialization of FilterList. */ private void changeMatcher(MatcherEditor<? super E> matcherEditor, Matcher<? super E> matcher, int changeType) { // first check if this list is already disposed if (!disposed) { // ensure the MatcherEvent is from OUR MatcherEditor if (currentEditor != matcherEditor) throw new IllegalStateException(); switch (changeType) { case MatcherEditor.Event.CONSTRAINED: currentMatcher = matcher; this.constrained(); break; case MatcherEditor.Event.RELAXED: currentMatcher = matcher; this.relaxed(); break; case MatcherEditor.Event.CHANGED: currentMatcher = matcher; this.changed(); break; case MatcherEditor.Event.MATCH_ALL: currentMatcher = Matchers.trueMatcher(); this.matchAll(); break; case MatcherEditor.Event.MATCH_NONE: currentMatcher = Matchers.falseMatcher(); this.matchNone(); break; } } }
/** * This method selects an appropriate delegate method to perform the * correct work for each of the possible <code>changeType</code>s. This * method does <strong>NOT</strong> acquire any locks and is thus used * during initialization of FilterList. */ private void changeMatcher(MatcherEditor<? super E> matcherEditor, Matcher<? super E> matcher, int changeType) { // first check if this list is already disposed if (!disposed) { // ensure the MatcherEvent is from OUR MatcherEditor if (currentEditor != matcherEditor) throw new IllegalStateException(); switch (changeType) { case MatcherEditor.Event.CONSTRAINED: currentMatcher = matcher; this.constrained(); break; case MatcherEditor.Event.RELAXED: currentMatcher = matcher; this.relaxed(); break; case MatcherEditor.Event.CHANGED: currentMatcher = matcher; this.changed(); break; case MatcherEditor.Event.MATCH_ALL: currentMatcher = Matchers.trueMatcher(); this.matchAll(); break; case MatcherEditor.Event.MATCH_NONE: currentMatcher = Matchers.falseMatcher(); this.matchNone(); break; } } }
/** * This method selects an appropriate delegate method to perform the * correct work for each of the possible <code>changeType</code>s. This * method does <strong>NOT</strong> acquire any locks and is thus used * during initialization of FilterList. */ private void changeMatcher(MatcherEditor<? super E> matcherEditor, Matcher<? super E> matcher, int changeType) { // first check if this list is already disposed if (!disposed) { // ensure the MatcherEvent is from OUR MatcherEditor if (currentEditor != matcherEditor) throw new IllegalStateException(); switch (changeType) { case MatcherEditor.Event.CONSTRAINED: currentMatcher = matcher; this.constrained(); break; case MatcherEditor.Event.RELAXED: currentMatcher = matcher; this.relaxed(); break; case MatcherEditor.Event.CHANGED: currentMatcher = matcher; this.changed(); break; case MatcherEditor.Event.MATCH_ALL: currentMatcher = Matchers.trueMatcher(); this.matchAll(); break; case MatcherEditor.Event.MATCH_NONE: currentMatcher = Matchers.falseMatcher(); this.matchNone(); break; } } }