Package it.unimi.dsi.fastutil.ints
Class AbstractIntSet
java.lang.Object
java.util.AbstractCollection<Integer>
it.unimi.dsi.fastutil.ints.AbstractIntCollection
it.unimi.dsi.fastutil.ints.AbstractIntSet
- All Implemented Interfaces:
IntCollection,IntIterable,IntSet,Cloneable,Iterable<Integer>,Collection<Integer>,Set<Integer>
- Direct Known Subclasses:
AbstractIntSortedSet,IntArraySet,IntOpenCustomHashSet,IntOpenHashBigSet,IntOpenHashSet,IntSets.Singleton
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
Methods inherited from class it.unimi.dsi.fastutil.ints.AbstractIntCollection
add, add, addAll, addAll, contains, contains, containsAll, containsAll, forEach, remove, removeAll, removeAll, removeIf, retainAll, retainAll, toArray, toIntArray, toIntArray, toStringMethods inherited from interface java.util.Collection
toArrayMethods inherited from interface it.unimi.dsi.fastutil.ints.IntCollection
add, addAll, contains, containsAll, intIterator, intParallelStream, intSpliterator, intStream, parallelStream, removeAll, removeIf, removeIf, removeIf, retainAll, stream, toArray, toIntArray, toIntArrayMethods inherited from interface it.unimi.dsi.fastutil.ints.IntIterable
forEach, forEach, forEachMethods inherited from interface it.unimi.dsi.fastutil.ints.IntSet
add, contains, remove, spliterator
-
Method Details
-
iterator
Description copied from interface:IntCollectionReturns a type-specific iterator on the elements of this collection.- Specified by:
iteratorin interfaceCollection<Integer>- Specified by:
iteratorin interfaceIntCollection- Specified by:
iteratorin interfaceIntIterable- Specified by:
iteratorin interfaceIntSet- Specified by:
iteratorin interfaceIterable<Integer>- Specified by:
iteratorin interfaceSet<Integer>- Specified by:
iteratorin classAbstractIntCollection- Returns:
- a type-specific iterator on the elements of this collection.
- See Also:
-
equals
-
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. -
remove
public boolean remove(int k) Removes an element from this set. Delegates to the type-specificrem()method implemented by type-specific abstractCollectionsuperclass. -
rem
Deprecated.Please useremove()instead.Removes a single instance of the specified element from this collection, if it is present (optional operation).Note that this method should be called
remove(), but the clash with the similarly named index-based method in theListinterface forces us to use a distinguished name. For simplicity, the set interfaces reinstatesremove(). Delegates to the type-specificremove()method specified in the type-specificSetinterface.- Specified by:
remin interfaceIntCollection- Specified by:
remin interfaceIntSet- Overrides:
remin classAbstractIntCollection- See Also:
-
remove()instead.