Package it.unimi.dsi.fastutil.objects
Class AbstractReferenceSet<K>
- java.lang.Object
-
- java.util.AbstractCollection<K>
-
- it.unimi.dsi.fastutil.objects.AbstractReferenceCollection<K>
-
- it.unimi.dsi.fastutil.objects.AbstractReferenceSet<K>
-
- All Implemented Interfaces:
ObjectIterable<K>,ReferenceCollection<K>,ReferenceSet<K>,Cloneable,Iterable<K>,Collection<K>,Set<K>
- Direct Known Subclasses:
AbstractReferenceSortedSet,ReferenceArraySet,ReferenceOpenHashBigSet,ReferenceOpenHashSet,ReferenceSets.Singleton
public abstract class AbstractReferenceSet<K> extends AbstractReferenceCollection<K> implements Cloneable, ReferenceSet<K>
An abstract class providing basic methods for sets implementing a type-specific interface.Note that the type-specific
Setinterface adds a type-specificremove()method, as it is no longer harmful for subclasses. Thus, concrete subclasses of this class must implementremove()(therem()implementation of this class just delegates toremove()).
-
-
Method Summary
-
Methods inherited from class it.unimi.dsi.fastutil.objects.AbstractReferenceCollection
toString
-
Methods inherited from class java.util.AbstractCollection
add, addAll, clear, contains, containsAll, isEmpty, remove, removeAll, retainAll, size, toArray, toArray
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
-
-
-
Method Detail
-
iterator
public abstract ObjectIterator<K> iterator()
Description copied from interface:ReferenceCollectionReturns a type-specific iterator on the elements of this collection.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 extendsCollection.- Specified by:
iteratorin interfaceCollection<K>- Specified by:
iteratorin interfaceIterable<K>- Specified by:
iteratorin interfaceObjectIterable<K>- Specified by:
iteratorin interfaceReferenceCollection<K>- Specified by:
iteratorin interfaceReferenceSet<K>- Specified by:
iteratorin interfaceSet<K>- Specified by:
iteratorin classAbstractReferenceCollection<K>- Returns:
- a type-specific iterator on the elements of this collection.
- See Also:
Iterable.iterator()
-
equals
public boolean equals(Object o)
-
hashCode
public int hashCode()
Returns a hash code for this set. The hash code of a set is computed by summing the hash codes of its elements.
-
-