ca.odell.glazedlists
Class GroupingList<E>
- EventListener, EventList<E>, List, ListEventListener<E>
public final class GroupingList<E>
A grouping list contains elements which are themselves Lists. Those Lists
are infact elements of the source list which have been grouped together into
a List. The logic of how to group the source elements into groups is specified
via a Comparator. Elements for which the Comparator returns 0 are guaranteed
to be contained within the same group within this GroupingList. This implies
that source elements may only participate in a single group within this
GroupingList.
Further transformations may be layered on top of this GroupingList to
transform the group lists into any other desirable form.
EventList Overview |
Writable: | yes |
Concurrency: | thread ready, not thread safe |
Performance: | reads: O(log N), writes O(log N) |
Memory: | |
Unit Tests: | GroupingListTest |
Issues: |
281
|
GroupingList(EventList source) - Creates a
GroupingList that determines groupings via the
Comparable interface which all elements of the source
are assumed to implement.
|
GroupingList(EventList source, Comparator comparator) - Creates a
GroupingList that determines groups using the specified
Comparator .
|
void | add(int index, List value) - This version of add will distribute all elements within the given
value List into groups.
|
void | dispose() -
|
List | get(int index)
|
protected int | getSourceIndex(int index) -
|
protected boolean | isWritable() -
|
void | listChanged(ListEvent listChanges) -
|
List | remove(int index) -
|
List | set(int index, List value) -
|
int | size() -
|
add , addAll , clear , dispose , get , getSourceIndex , isWritable , listChanged , remove , removeAll , retainAll , set , size |
T[] toArray , add , add , addAll , addAll , addListEventListener , clear , contains , containsAll , equals , get , getPublisher , getReadWriteLock , hashCode , indexOf , isEmpty , iterator , lastIndexOf , listIterator , listIterator , remove , remove , removeAll , removeListEventListener , retainAll , set , size , subList , toArray , toString |
GroupingList
public GroupingList(EventList source)
Creates a
GroupingList
that determines groupings via the
Comparable
interface which all elements of the
source
are assumed to implement.
GroupingList
public GroupingList(EventList source,
Comparator comparator)
Creates a
GroupingList
that determines groups using the specified
Comparator
.
source
- the EventList
containing elements to be groupedcomparator
- the Comparator
used to determine groupings
add
public void add(int index,
List value)
This version of add will distribute all elements within the given
value
List into groups. Existing groups will be reused and
new groups will be created as needed. As such, the
index
argument is meaningless.
Warning: This method
breaks the contract required by
List.add(int, Object)
.
set
public List set(int index,
List value)
Glazed Lists, Copyright © 2003-2006 publicobject.com, O'Dell Engineering.
Documentation build by pbuilder at 2007-12-21 23:49