Package it.unimi.dsi.fastutil.objects
Class AbstractObjectSet<K>
java.lang.Object
java.util.AbstractCollection<K>
it.unimi.dsi.fastutil.objects.AbstractObjectCollection<K>
it.unimi.dsi.fastutil.objects.AbstractObjectSet<K>
- All Implemented Interfaces:
ObjectCollection<K>,ObjectIterable<K>,ObjectSet<K>,java.lang.Cloneable,java.lang.Iterable<K>,java.util.Collection<K>,java.util.Set<K>
- Direct Known Subclasses:
AbstractDouble2DoubleMap.BasicEntrySet,AbstractDouble2IntMap.BasicEntrySet,AbstractDouble2LongMap.BasicEntrySet,AbstractDouble2ObjectMap.BasicEntrySet,AbstractInt2DoubleMap.BasicEntrySet,AbstractInt2IntMap.BasicEntrySet,AbstractInt2LongMap.BasicEntrySet,AbstractInt2ObjectMap.BasicEntrySet,AbstractLong2DoubleMap.BasicEntrySet,AbstractLong2IntMap.BasicEntrySet,AbstractLong2LongMap.BasicEntrySet,AbstractLong2ObjectMap.BasicEntrySet,AbstractObject2DoubleMap.BasicEntrySet,AbstractObject2IntMap.BasicEntrySet,AbstractObject2LongMap.BasicEntrySet,AbstractObject2ObjectMap.BasicEntrySet,AbstractObjectSortedSet,ObjectArraySet,ObjectOpenCustomHashSet,ObjectOpenHashBigSet,ObjectOpenHashSet,ObjectSets.Singleton
public abstract class AbstractObjectSet<K> extends AbstractObjectCollection<K> implements java.lang.Cloneable, ObjectSet<K>
An abstract class providing basic methods for sets implementing a
type-specific interface.
Note that the type-specific Set interface adds a type-specific
remove() method, as it is no longer harmful for subclasses. Thus,
concrete subclasses of this class must implement remove() (the
rem() implementation of this class just delegates to
remove()).
-
Method Summary
Modifier and Type Method Description booleanequals(java.lang.Object o)inthashCode()Returns a hash code for this set.abstract ObjectIterator<K>iterator()Returns a type-specific iterator on the elements of this collection.Methods inherited from class it.unimi.dsi.fastutil.objects.AbstractObjectCollection
toStringMethods inherited from class java.util.AbstractCollection
add, addAll, clear, contains, containsAll, isEmpty, remove, removeAll, retainAll, size, toArray, toArrayMethods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.lang.Iterable
forEachMethods inherited from interface it.unimi.dsi.fastutil.objects.ObjectSet
spliteratorMethods inherited from interface java.util.Set
add, addAll, clear, contains, containsAll, isEmpty, remove, removeAll, retainAll, size, toArray, toArray
-
Method Details
-
iterator
Description copied from interface:ObjectCollectionReturns a type-specific iterator on the elements of this collection.- Specified by:
iteratorin interfacejava.util.Collection<K>- Specified by:
iteratorin interfacejava.lang.Iterable<K>- Specified by:
iteratorin interfaceObjectCollection<K>- Specified by:
iteratorin interfaceObjectIterable<K>- Specified by:
iteratorin interfaceObjectSet<K>- Specified by:
iteratorin interfacejava.util.Set<K>- Specified by:
iteratorin classAbstractObjectCollection<K>- Returns:
- a type-specific iterator on the elements of this collection.
- See Also:
Iterable.iterator()
-
equals
public boolean equals(java.lang.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.
-