public abstract class AbstractReferenceCollection<K> extends AbstractCollection<K> implements ReferenceCollection<K>
In particular, this class provide iterator(), add(),
AbstractCollection.remove(Object) and AbstractCollection.contains(Object) methods that just call
the type-specific counterpart.
Warning: Because of a name clash between the list and
collection interfaces the type-specific deletion method of a type-specific
abstract collection is rem(), rather then remove().
A subclass must thus override rem(), rather than
remove(), to make all inherited methods work properly.
| Modifier and Type | Method and Description |
|---|---|
abstract ObjectIterator<K> |
iterator()
Returns a type-specific iterator on the elements of this collection.
|
ObjectIterator<K> |
objectIterator()
Deprecated.
As of
fastutil 5, replaced by
iterator(). |
String |
toString() |
add, addAll, clear, contains, containsAll, isEmpty, remove, removeAll, retainAll, size, toArray, toArrayequals, getClass, hashCode, notify, notifyAll, wait, wait, waitadd, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray@Deprecated public ObjectIterator<K> objectIterator()
fastutil 5, replaced by
iterator().
This implementation delegates to the new covariantly stronger generic
method iterator().
objectIterator in interface ReferenceCollection<K>ReferenceCollection.iterator()public abstract ObjectIterator<K> iterator()
ReferenceCollection
Note 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 ObjectIterable<K>iterator in interface ReferenceCollection<K>iterator in interface Iterable<K>iterator in interface Collection<K>iterator in class AbstractCollection<K>Iterable.iterator()public String toString()
toString in class AbstractCollection<K>