Package it.unimi.dsi.fastutil.objects
Class AbstractReferenceCollection<K>
java.lang.Object
java.util.AbstractCollection<K>
it.unimi.dsi.fastutil.objects.AbstractReferenceCollection<K>
- All Implemented Interfaces:
it.unimi.dsi.fastutil.objects.ObjectIterable<K>,ReferenceCollection<K>,Iterable<K>,Collection<K>
- Direct Known Subclasses:
AbstractReferenceList,ReferenceCollections.EmptyCollection,ReferenceCollections.IterableCollection
public abstract class AbstractReferenceCollection<K>
extends AbstractCollection<K>
implements ReferenceCollection<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.
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.
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.util.AbstractCollection
add, addAll, clear, contains, containsAll, isEmpty, remove, removeAll, retainAll, size, toArray, toArrayMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, parallelStream, remove, removeAll, removeIf, retainAll, size, stream, toArray, toArray, toArrayMethods inherited from interface it.unimi.dsi.fastutil.objects.ReferenceCollection
spliterator
-
Constructor Details
-
AbstractReferenceCollection
protected AbstractReferenceCollection()
-
-
Method Details
-
iterator
Description copied from interface:ReferenceCollectionReturns a type-specific iterator on the elements of this collection.- Specified by:
iteratorin interfaceCollection<K>- Specified by:
iteratorin interfaceIterable<K>- Specified by:
iteratorin interfaceit.unimi.dsi.fastutil.objects.ObjectIterable<K>- Specified by:
iteratorin interfaceReferenceCollection<K>- Specified by:
iteratorin classAbstractCollection<K>- Returns:
- a type-specific iterator on the elements of this collection.
-
toString
- Overrides:
toStringin classAbstractCollection<K>
-