|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.grizzly.utils.ArraySet<T>
public class ArraySet<T>
The thread safe set implementation, which uses array to hold its elements. This set could be used, for cases, which require minimum set modifications.
| Constructor Summary | |
|---|---|
ArraySet(java.lang.Class<T> clazz)
|
|
ArraySet(java.lang.Class<T> clazz,
boolean replaceElementIfEquals)
|
|
| Method Summary | ||
|---|---|---|
boolean |
add(ArraySet<T> source)
Add all the elements from the source ArraySet. |
|
boolean |
add(T element)
|
|
boolean |
addAll(java.util.Collection<? extends T> collection)
|
|
boolean |
addAll(T... elements)
Add the element(s) to the set. |
|
void |
clear()
Remove all the set elements. |
|
boolean |
contains(java.lang.Object o)
|
|
boolean |
containsAll(java.util.Collection<?> collection)
|
|
T[] |
getArray()
Get the underlying array. |
|
T[] |
getArrayCopy()
Get the copy of the underlying array. |
|
boolean |
isEmpty()
|
|
java.util.Iterator<T> |
iterator()
|
|
T[] |
obtainArrayCopy()
Get the copy of the underlying array. |
|
boolean |
remove(java.lang.Object o)
|
|
boolean |
removeAll(java.util.Collection<?> collection)
|
|
boolean |
removeAll(java.lang.Object... elements)
Remove element(s) from the set. |
|
boolean |
retainAll(java.util.Collection<?> collection)
|
|
int |
size()
|
|
java.lang.Object[] |
toArray()
|
|
|
toArray(K[] a)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Set |
|---|
equals, hashCode |
| Constructor Detail |
|---|
public ArraySet(java.lang.Class<T> clazz)
public ArraySet(java.lang.Class<T> clazz,
boolean replaceElementIfEquals)
| Method Detail |
|---|
public final boolean addAll(T... elements)
elements - the elements to add.
public boolean addAll(java.util.Collection<? extends T> collection)
addAll in interface java.util.Collection<T>addAll in interface java.util.Set<T>public final boolean add(ArraySet<T> source)
source - the elements to add.
public final boolean removeAll(java.lang.Object... elements)
elements - the element(s) to remove.
public final T[] getArray()
add(Object) and remove(Object) instead.
public final T[] getArrayCopy()
public final T[] obtainArrayCopy()
public void clear()
clear in interface java.util.Collection<T>clear in interface java.util.Set<T>public int size()
size in interface java.util.Collection<T>size in interface java.util.Set<T>public boolean isEmpty()
isEmpty in interface java.util.Collection<T>isEmpty in interface java.util.Set<T>public boolean add(T element)
add in interface java.util.Collection<T>add in interface java.util.Set<T>public boolean contains(java.lang.Object o)
contains in interface java.util.Collection<T>contains in interface java.util.Set<T>public java.lang.Object[] toArray()
toArray in interface java.util.Collection<T>toArray in interface java.util.Set<T>public <K> K[] toArray(K[] a)
toArray in interface java.util.Collection<T>toArray in interface java.util.Set<T>public boolean remove(java.lang.Object o)
remove in interface java.util.Collection<T>remove in interface java.util.Set<T>public boolean containsAll(java.util.Collection<?> collection)
containsAll in interface java.util.Collection<T>containsAll in interface java.util.Set<T>public boolean retainAll(java.util.Collection<?> collection)
retainAll in interface java.util.Collection<T>retainAll in interface java.util.Set<T>public boolean removeAll(java.util.Collection<?> collection)
removeAll in interface java.util.Collection<T>removeAll in interface java.util.Set<T>public java.util.Iterator<T> iterator()
iterator in interface java.lang.Iterable<T>iterator in interface java.util.Collection<T>iterator in interface java.util.Set<T>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||