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 an iterator over the elements contained in this collection.
|
String |
toString()
Returns a string representation of this collection.
|
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, toArraypublic abstract ObjectIterator<K> iterator()
java.util.AbstractCollectioniterator 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()
java.util.AbstractCollectionString.valueOf(Object).toString in class AbstractCollection<K>