ca.odell.glazedlists
Class FreezableList<E>
- EventListener, EventList<E>, List, ListEventListener<E>
public final class FreezableList<E>
An
EventList
that shows the current contents of its source
EventList
.
When this
EventList
is
frozen, changes to its source
EventList
will not be reflected. Instead, the
FreezableList
will continue to show
the state of its source
EventList
at the time it was frozen.
When this
EventList
is
thawed, changes to its source
EventList
will be reflected.
EventList Overview |
Writable: | writable when thawed (default), not writable when frozen |
Concurrency: | thread ready, not thread safe |
Performance: | reads: O(1), writes O(1), freezes O(N) |
Memory: | frozen: 4 bytes per element, thawed: 0 bytes per element |
Unit Tests: | N/A |
Issues: | N/A |
Issues: |
|
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 |
FreezableList
public FreezableList(EventList source)
freeze
public void freeze()
Locks this
FreezableList
on the current state of the source
EventList
. While frozen, changes to the source
EventList
will not be reflected by this list.
Warning: This method is
thread ready but not thread safe. See
EventList
for an example
of thread safe code.
isFrozen
public boolean isFrozen()
- true if this list is showing a previous state of the source
EventList
or false if this is showing the current state
of the source EventList
.
thaw
public void thaw()
Unlocks this
FreezableList
to show the same contents of the source
EventList
. When thawed, changes to the source
EventList
will be reflected by this list.
Warning: This method is
thread ready but not thread safe. See
EventList
for an example
of thread safe code.
Glazed Lists, Copyright © 2003-2006 publicobject.com, O'Dell Engineering.
Documentation build by pbuilder at 2007-12-21 23:49