|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection<K>
it.unimi.dsi.fastutil.objects.AbstractObjectCollection<K>
public abstract class AbstractObjectCollection<K>
An abstract class providing basic methods for collections implementing a type-specific interface.
In particular, this class provide iterator(), add(), AbstractCollection.remove(Object) and
AbstractCollection.contains(Object) methods that just call the type-specific counterpart.
| Constructor Summary | |
|---|---|
protected |
AbstractObjectCollection()
|
| Method Summary | ||
|---|---|---|
boolean |
add(K k)
|
|
boolean |
addAll(java.util.Collection<? extends K> c)
Adds all elements of the given collection to this collection. |
|
boolean |
containsAll(java.util.Collection<?> c)
Checks whether this collection contains all elements from the given collection. |
|
boolean |
isEmpty()
|
|
abstract ObjectIterator<K> |
iterator()
Returns a type-specific iterator on the elements of this collection. |
|
ObjectIterator<K> |
objectIterator()
Deprecated. |
|
boolean |
removeAll(java.util.Collection<?> c)
Remove from this collection all elements in the given collection. |
|
boolean |
retainAll(java.util.Collection<?> c)
Retains in this collection only elements from the given collection. |
|
java.lang.Object[] |
toArray()
|
|
|
toArray(T[] a)
Returns an containing the items of this collection; the runtime type of the returned array is that of the specified array. |
|
java.lang.String |
toString()
|
|
| Methods inherited from class java.util.AbstractCollection |
|---|
clear, contains, remove, size |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Collection |
|---|
clear, contains, equals, hashCode, remove, size |
| Constructor Detail |
|---|
protected AbstractObjectCollection()
| Method Detail |
|---|
public java.lang.Object[] toArray()
toArray in interface java.util.Collection<K>toArray in class java.util.AbstractCollection<K>public <T> T[] toArray(T[] a)
ObjectCollectionWarning: Note that, contrarily to Collection.toArray(Object[]), this
methods just writes all elements of this collection: no special
value will be added after the last one.
toArray in interface ObjectCollection<K>toArray in interface java.util.Collection<K>toArray in class java.util.AbstractCollection<K>a - if this array is big enough, it will be used to store this collection.
Collection.toArray(Object[])public boolean addAll(java.util.Collection<? extends K> c)
addAll in interface java.util.Collection<K>addAll in class java.util.AbstractCollection<K>c - a collection.
true if this collection changed as a result of the call.public boolean add(K k)
add in interface java.util.Collection<K>add in class java.util.AbstractCollection<K>@Deprecated public ObjectIterator<K> objectIterator()
objectIterator in interface ObjectCollection<K>ObjectCollection.iterator()public abstract ObjectIterator<K> iterator()
ObjectCollectionNote that this specification strengthens the one given in
Iterable.iterator(), which was already
strengthened in the corresponding type-specific class,
but was weakened by the fact that this interface extends Collection.
iterator in interface ObjectCollection<K>iterator in interface ObjectIterable<K>iterator in interface java.lang.Iterable<K>iterator in interface java.util.Collection<K>iterator in class java.util.AbstractCollection<K>public boolean containsAll(java.util.Collection<?> c)
containsAll in interface java.util.Collection<K>containsAll in class java.util.AbstractCollection<K>c - a collection.
true if this collection contains all elements of the argument.public boolean retainAll(java.util.Collection<?> c)
retainAll in interface java.util.Collection<K>retainAll in class java.util.AbstractCollection<K>c - a collection.
true if this collection changed as a result of the call.public boolean removeAll(java.util.Collection<?> c)
removeAll in interface java.util.Collection<K>removeAll in class java.util.AbstractCollection<K>c - a collection.
true if this collection changed as a result of the call.public boolean isEmpty()
isEmpty in interface java.util.Collection<K>isEmpty in class java.util.AbstractCollection<K>public java.lang.String toString()
toString in class java.util.AbstractCollection<K>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||