|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jjoost.collections.base.SynchronizedDelegator
org.jjoost.collections.sets.wrappers.SynchronizedArbitrarySet<V,Set<V>>
org.jjoost.collections.sets.wrappers.SynchronizedSet<V>
public class SynchronizedSet<V>
| Constructor Summary | |
|---|---|
SynchronizedSet(Set<V> delegate)
|
|
| Method Summary | |
|---|---|
Set<V> |
copy()
Returns a copy of the set. |
V |
get(V key)
Returns the value stored in the set that is equal to the provided value, as determined by any provided Equality or
Comparator. |
int |
size()
A convenience method returning the size of the set; this is equivalent to totalCount() or uniqueCount() |
Set<V> |
unique()
Returns an AnySet (usually a Set) representing only the unique values
present in this set; if this set is already unique this method should return the set itself. |
| Methods inherited from class org.jjoost.collections.sets.wrappers.SynchronizedArbitrarySet |
|---|
add, all, apply, clear, clearAndReturn, contains, count, equality, first, isEmpty, iterator, list, permitsDuplicates, put, putAll, putIfAbsent, remove, remove, removeAndReturn, removeAndReturn, removeAndReturnFirst, removeAndReturnFirst, shrink, totalCount, uniqueCount |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jjoost.collections.Set |
|---|
put |
| Methods inherited from interface org.jjoost.collections.AnySet |
|---|
add, clear, clearAndReturn, putAll, putIfAbsent, remove, remove, removeAndReturn, removeAndReturn, removeAndReturnFirst, removeAndReturnFirst, shrink |
| Methods inherited from interface org.jjoost.collections.AnyReadSet |
|---|
all, contains, count, equality, first, isEmpty, list, permitsDuplicates, totalCount, uniqueCount |
| Methods inherited from interface java.lang.Iterable |
|---|
iterator |
| Methods inherited from interface org.jjoost.util.Function |
|---|
apply |
| Constructor Detail |
|---|
public SynchronizedSet(Set<V> delegate)
| Method Detail |
|---|
public Set<V> unique()
AnySetAnySet (usually a Set) representing only the unique values
present in this set; if this set is already unique this method should return the set itself.
Changes to each set should be reflected in the other, however put() operations on the unique()
set will not be supported if the underlying set is not itself unique.
unique in interface AnyReadSet<V>unique in interface AnySet<V>unique in interface Set<V>unique in class SynchronizedArbitrarySet<V,Set<V>>public Set<V> copy()
AnySetSet or MultiSet).
copy in interface AnySet<V>copy in interface Set<V>copy in class SynchronizedArbitrarySet<V,Set<V>>public V get(V key)
SetEquality or
Comparator. Returns null if no matching item is stored in the set. Equivalent to first(key)
get in interface Set<V>key - value to find
public int size()
SettotalCount() or uniqueCount()
size in interface Set<V>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||