Package it.unimi.dsi.fastutil.longs
Class AbstractLongSet
java.lang.Object
java.util.AbstractCollection<Long>
it.unimi.dsi.fastutil.longs.AbstractLongCollection
it.unimi.dsi.fastutil.longs.AbstractLongSet
- All Implemented Interfaces:
it.unimi.dsi.fastutil.longs.LongCollection,it.unimi.dsi.fastutil.longs.LongIterable,LongSet,Cloneable,Iterable<Long>,Collection<Long>,Set<Long>
- Direct Known Subclasses:
AbstractLongSortedSet,LongArraySet,LongOpenCustomHashSet,LongOpenHashBigSet,LongOpenHashSet,LongSets.Singleton
public abstract class AbstractLongSet
extends it.unimi.dsi.fastutil.longs.AbstractLongCollection
implements Cloneable, LongSet
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()).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()Returns a hash code for this set.abstract it.unimi.dsi.fastutil.longs.LongIteratoriterator()Returns a type-specific iterator on the elements of this set.booleanrem(long k) Deprecated.booleanremove(long k) Removes an element from this set.Methods inherited from class it.unimi.dsi.fastutil.longs.AbstractLongCollection
add, add, addAll, addAll, contains, contains, containsAll, containsAll, forEach, remove, removeAll, removeAll, removeIf, retainAll, retainAll, toArray, toLongArray, toLongArray, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
toArrayMethods inherited from interface it.unimi.dsi.fastutil.longs.LongCollection
add, addAll, contains, containsAll, longIterator, longParallelStream, longSpliterator, longStream, parallelStream, removeAll, removeIf, removeIf, removeIf, retainAll, stream, toArray, toLongArray, toLongArrayMethods inherited from interface it.unimi.dsi.fastutil.longs.LongIterable
forEach, forEach, forEachMethods inherited from interface it.unimi.dsi.fastutil.longs.LongSet
add, contains, remove, spliterator
-
Constructor Details
-
AbstractLongSet
protected AbstractLongSet()
-
-
Method Details
-
iterator
public abstract it.unimi.dsi.fastutil.longs.LongIterator iterator()Description copied from interface:LongSetReturns a type-specific iterator on the elements of this set.- Specified by:
iteratorin interfaceCollection<Long>- Specified by:
iteratorin interfaceIterable<Long>- Specified by:
iteratorin interfaceit.unimi.dsi.fastutil.longs.LongCollection- Specified by:
iteratorin interfaceit.unimi.dsi.fastutil.longs.LongIterable- Specified by:
iteratorin interfaceLongSet- Specified by:
iteratorin interfaceSet<Long>- Specified by:
iteratorin classit.unimi.dsi.fastutil.longs.AbstractLongCollection- Returns:
- a type-specific iterator on the elements of this set.
-
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(long k) Removes an element from this set. Delegates to the type-specificrem()method implemented by type-specific abstractCollectionsuperclass. -
rem
Deprecated.Please useremove()instead.Removes an element from this set.This method is inherited from the type-specific collection this type-specific set is based on, but it should not used as this interface reinstates
remove()as removal method. Delegates to the type-specificremove()method specified in the type-specificSetinterface.
-
remove()instead.