Package it.unimi.dsi.fastutil.shorts
Class AbstractShortSet
java.lang.Object
java.util.AbstractCollection<Short>
it.unimi.dsi.fastutil.shorts.AbstractShortCollection
it.unimi.dsi.fastutil.shorts.AbstractShortSet
- All Implemented Interfaces:
it.unimi.dsi.fastutil.shorts.ShortCollection,it.unimi.dsi.fastutil.shorts.ShortIterable,ShortSet,Cloneable,Iterable<Short>,Collection<Short>,Set<Short>
- Direct Known Subclasses:
AbstractShortSortedSet,ShortArraySet,ShortOpenCustomHashSet,ShortOpenHashSet,ShortSets.Singleton
public abstract class AbstractShortSet
extends it.unimi.dsi.fastutil.shorts.AbstractShortCollection
implements Cloneable, ShortSet
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.shorts.ShortIteratoriterator()Returns a type-specific iterator on the elements of this set.booleanrem(short k) Deprecated.booleanremove(short k) Removes an element from this set.Methods inherited from class it.unimi.dsi.fastutil.shorts.AbstractShortCollection
add, add, addAll, addAll, contains, contains, containsAll, containsAll, remove, removeAll, removeAll, retainAll, retainAll, toArray, toShortArray, toShortArray, 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 java.util.Set
addAll, clear, containsAll, isEmpty, removeAll, retainAll, size, toArray, toArrayMethods inherited from interface it.unimi.dsi.fastutil.shorts.ShortCollection
add, addAll, contains, containsAll, intIterator, intParallelStream, intSpliterator, intStream, parallelStream, removeAll, removeIf, removeIf, removeIf, retainAll, stream, toArray, toShortArray, toShortArrayMethods inherited from interface it.unimi.dsi.fastutil.shorts.ShortIterable
forEach, forEach, forEachMethods inherited from interface it.unimi.dsi.fastutil.shorts.ShortSet
add, contains, remove, spliterator
-
Constructor Details
-
AbstractShortSet
protected AbstractShortSet()
-
-
Method Details
-
iterator
public abstract it.unimi.dsi.fastutil.shorts.ShortIterator iterator()Description copied from interface:ShortSetReturns a type-specific iterator on the elements of this set.- Specified by:
iteratorin interfaceCollection<Short>- Specified by:
iteratorin interfaceIterable<Short>- Specified by:
iteratorin interfaceSet<Short>- Specified by:
iteratorin interfaceit.unimi.dsi.fastutil.shorts.ShortCollection- Specified by:
iteratorin interfaceit.unimi.dsi.fastutil.shorts.ShortIterable- Specified by:
iteratorin interfaceShortSet- Specified by:
iteratorin classit.unimi.dsi.fastutil.shorts.AbstractShortCollection- 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(short 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.