|
com.ideanest.swing
|
Method Summary | |
static ActiveCollection |
activeCollection(java.util.Collection c)
Returns an active version of the specified collection that fires ListDataEvent s when the collection is mutated. |
static ActiveList |
activeList(java.util.List list)
Returns an active version of the specified list that fires ListDataEvent s when the list is mutated. |
static ActiveSet |
activeSet(java.util.Set c)
Returns an active version of the specified set that fires ListDataEvent s when the set is mutated. |
static ActiveSortedSet |
activeSortedSet(java.util.SortedSet c)
Returns an active version of the specified sorted set that fires ListDataEvent s when the sorted set is mutated. |
static ActiveCollection |
synchronizedActiveCollection(java.util.Collection c)
Returns a synchronized active version of the specified collection that fires ListDataEvent s when the collection is mutated. |
static ActiveList |
synchronizedActiveList(java.util.List c)
Returns a synchronized active version of the specified list that fires ListDataEvent s when the list is mutated. |
static ActiveSet |
synchronizedActiveSet(java.util.Set c)
Returns a synchronized active version of the specified set that fires ListDataEvent s when the set is mutated. |
static ActiveSortedSet |
synchronizedActiveSortedSet(java.util.SortedSet c)
Returns a synchronized active version of the specified sorted set that fires ListDataEvent s when the set is mutated. |
static ActiveCollection |
unmodifiableActiveCollection(ActiveCollection c)
Returns an unmodifiable view of the specified active collection. |
static ActiveList |
unmodifiableActiveList(ActiveList c)
Returns an unmodifiable view of the specified active list. |
static ActiveSet |
unmodifiableActiveSet(ActiveSet c)
Returns an unmodifiable view of the specified active set. |
static ActiveSortedSet |
unmodifiableActiveSortedSet(ActiveSortedSet c)
Returns an unmodifiable view of the specified active sorted set. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static ActiveCollection activeCollection(java.util.Collection c)
ListDataEvent
s when the collection is mutated. Note
that all mutation must take place through the active version, or
through objects that it returns (i.e. through iterators or
subcollections).The returned collection does not pass the hashCode and equals operations through to the backing collection, but relies on Object's equals and hashCode methods. This is necessary to preserve the contracts of these operations in the case that the backing collection is a set or a list.
The returned collection will be serializable if the specified collection is serializable.
c
- the collection for which an active version is to be returned
public static ActiveList activeList(java.util.List list)
ListDataEvent
s when the list is mutated. Note
that all mutation must take place through the active version, or
through objects that it returns (i.e. through iterators or
sublists).The returned list will be serializable if the specified list is serializable.
list
- the list for which an active version is to be returned
public static ActiveSet activeSet(java.util.Set c)
ListDataEvent
s when the set is mutated. Note
that all mutation must take place through the active version, or
through objects that it returns (i.e. through iterators or
subsets).The returned set will be serializable if the specified set is serializable.
c
- the set for which an active version is to be returned
public static ActiveSortedSet activeSortedSet(java.util.SortedSet c)
ListDataEvent
s when the sorted set is mutated. Note
that all mutation must take place through the active version, or
through objects that it returns (i.e. through iterators or
subsorted sets).The returned sorted set will be serializable if the specified sorted set is serializable.
c
- the sorted set for which an active version is to be returned
public static ActiveCollection synchronizedActiveCollection(java.util.Collection c)
ListDataEvent
s when the collection is mutated. Note
that all mutation must take place through the active version, or
through objects that it returns (i.e. through iterators or
subcollections).
The returned collection will implement Lockable
and will
enforce mutual exclusion on all its operations. To maintain a lock on
the collection for the duration of more than one operation, you should
synchronize on its lock. This is absolutely required for iteration,
for example:
ActiveCollection bag = ActiveCollections.synchronizedActiveCollection(new ArrayList()); bag.add("a"); bag.add("b"); synchronized( ((Lockable) bag).getLock() ) { Iterator it = bag.iterator(); while(it.hasNext()) { System.out.println(it.next()); } }
The returned collection does not pass the hashCode and equals operations through to the backing collection, but relies on Object's equals and hashCode methods. This is necessary to preserve the contracts of these operations in the case that the backing collection is a set or a list.
The returned collection will be serializable if the specified collection is serializable.
c
- the collection for which an active version is to be returned
public static ActiveList synchronizedActiveList(java.util.List c)
ListDataEvent
s when the list is mutated. Note
that all mutation must take place through the active version, or
through objects that it returns (i.e. through iterators or
subcollections).
The returned list will implement Lockable
and will
enforce mutual exclusion on all its operations.
The returned list will be serializable if the specified collection is serializable.
c
- the list for which a synchronized active version is to be returned
public static ActiveSet synchronizedActiveSet(java.util.Set c)
ListDataEvent
s when the set is mutated. Note
that all mutation must take place through the active version, or
through objects that it returns (i.e. through iterators or
subcollections).
The returned set will implement Lockable
and will
enforce mutual exclusion on all its operations.
The returned set will be serializable if the specified collection is serializable.
c
- the set for which a synchronized active version is to be returned
public static ActiveSortedSet synchronizedActiveSortedSet(java.util.SortedSet c)
ListDataEvent
s when the set is mutated. Note
that all mutation must take place through the active version, or
through objects that it returns (i.e. through iterators or
subcollections).
The returned sorted set will implement Lockable
and will
enforce mutual exclusion on all its operations.
The returned sorted set will be serializable if the specified collection is serializable.
c
- the sorted set for which a synchronized active version is to be returned
public static ActiveCollection unmodifiableActiveCollection(ActiveCollection c)
UnsupportedOperationException
.The returned collection does not pass the hashCode and equals operations through to the backing collection, but relies on Object's equals and hashCode methods. This is necessary to preserve the contracts of these operations in the case that the backing collection is a set or a list.
The returned collection will be serializable if the specified collection is serializable. The returned collection will be lockable if the specified collection is lockable.
c
- the active collection for which an unmodifiable view is to be returned
public static ActiveList unmodifiableActiveList(ActiveList c)
UnsupportedOperationException
.The returned list will be serializable if the specified list is serializable. The returned list will be lockable if the specified collection is lockable.
c
- the active list for which an unmodifiable view is to be returned
public static ActiveSet unmodifiableActiveSet(ActiveSet c)
UnsupportedOperationException
.The returned set will be serializable if the specified set is serializable. The returned set will be lockable if the specified collection is lockable.
c
- the active set for which an unmodifiable view is to be returned
public static ActiveSortedSet unmodifiableActiveSortedSet(ActiveSortedSet c)
UnsupportedOperationException
.The returned sorted set will be serializable if the specified sorted set is serializable. The returned sorted set will be lockable if the specified collection is lockable.
c
- the active sorted set for which an unmodifiable view is to be returned
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |