ca.odell.glazedlists.matchers
Class RangeMatcherEditor<D,extends,Comparable,E>
- MatcherEditor<E>
public class RangeMatcherEditor<D,extends,Comparable,E>
A MatcherEditor that produces Matchers which match Objects if they lie
within a range of
Comparables. This
RangeMatcherEditor is
not coupled with any UI component that allows the user to edit the range.
That job is left to subclasses. This MatcherEditor is fully concrete, and
may be used directly by headless applications.
The
RangeMatcherEditor requires that either a
Filterator
appropriate for extracting
Comparable objects be specified in its
constructor, or that every Object to be matched is a
Comparable.
Filterator | getFilterator()- Get the filterator used to extract Comparables from the matched elements.
|
void | setRange(D newStart, D newEnd)- This method is used to change the range currently matched by this
MatcherEditor.
|
RangeMatcherEditor
public RangeMatcherEditor()
RangeMatcherEditor
public RangeMatcherEditor(Filterator filterator)
filterator - the object that will extract filter Comparables from
each object in the source; null indicates
the list elements are Comparables
getFilterator
public Filterator getFilterator()
Get the filterator used to extract Comparables from the matched elements.
setRange
public void setRange(D newStart,
D newEnd) This method is used to change the range currently matched by this
MatcherEditor. When a change to the range is detected, users of this
class are expected to call this method with the new bounds of the
range to be matched.
null values for either
newStart or
newEnd indicate there is no start of end to the range
respectively. Consequently, calling
setRange(null, null)
causes this matcher editor match all values it filters.
Note: if
newStart and
newEnd are out of
their natural order with respect to each other, their values are swapped.
For example,
setRange(Jan 1, 2006, Jan 1, 1955) would swap
the values so
newStart is
Jan 1, 1955 and
newEnd is
Jan 1, 2006.
newStart - the new value marking the start of the range;
null indicates there is no startnewEnd - the new value marking the start of the range;
null indicates there is no start
Glazed Lists, Copyright © 2003-2006 publicobject.com, O'Dell Engineering.
Documentation build by pbuilder at 2007-12-21 23:49