|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Set<V>
This interface declares that a set supports precisely one occurence of each value
Note that an Iterator returned by concurrent implementors of this class is permitted
to return values more times than they actually ever occurred if a valid sequence of deletes and inserts happens
to cause the Iterator to see the values multiple times. See the javadoc of the implementing classes
to determine their behaviour in this case.
| Method Summary | |
|---|---|
Set<V> |
copy()
Returns a copy of the set. |
V |
get(V find)
Returns the value stored in the set that is equal to the provided value, as determined by any provided Equality or
Comparator. |
V |
put(V value)
Insert the parameter into the set, removing and returning any value equal to the parameter that was already present, as determined by the set's definition of equality. |
int |
size()
A convenience method returning the size of the set; this is equivalent to totalCount() or uniqueCount() |
Set<V> |
unique()
Returns this |
| 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 |
| Method Detail |
|---|
V put(V value)
put in interface AnySet<V>value - value to insert
V get(V find)
Equality or
Comparator. Returns null if no matching item is stored in the set. Equivalent to first(key)
find - value to find
int size()
totalCount() or uniqueCount()
Set<V> copy()
Set
copy in interface AnySet<V>Set<V> unique()
this
unique in interface AnyReadSet<V>unique in interface AnySet<V>this
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||