Package it.unimi.dsi.fastutil.bytes
Class AbstractByteSet
java.lang.Object
java.util.AbstractCollection<Byte>
it.unimi.dsi.fastutil.bytes.AbstractByteCollection
it.unimi.dsi.fastutil.bytes.AbstractByteSet
- All Implemented Interfaces:
it.unimi.dsi.fastutil.bytes.ByteCollection,it.unimi.dsi.fastutil.bytes.ByteIterable,ByteSet,Cloneable,Iterable<Byte>,Collection<Byte>,Set<Byte>
- Direct Known Subclasses:
AbstractByteSortedSet,ByteArraySet,ByteOpenCustomHashSet,ByteOpenHashSet,ByteSets.Singleton
public abstract class AbstractByteSet
extends it.unimi.dsi.fastutil.bytes.AbstractByteCollection
implements Cloneable, ByteSet
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.bytes.ByteIteratoriterator()Returns a type-specific iterator on the elements of this set.booleanrem(byte k) Deprecated.booleanremove(byte k) Removes an element from this set.Methods inherited from class it.unimi.dsi.fastutil.bytes.AbstractByteCollection
add, add, addAll, addAll, contains, contains, containsAll, containsAll, remove, removeAll, removeAll, retainAll, retainAll, toArray, toByteArray, toByteArray, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface it.unimi.dsi.fastutil.bytes.ByteCollection
add, addAll, contains, containsAll, intIterator, intParallelStream, intSpliterator, intStream, parallelStream, removeAll, removeIf, removeIf, removeIf, retainAll, stream, toArray, toByteArray, toByteArrayMethods inherited from interface it.unimi.dsi.fastutil.bytes.ByteIterable
forEach, forEach, forEachMethods inherited from interface it.unimi.dsi.fastutil.bytes.ByteSet
add, contains, remove, spliteratorMethods inherited from interface java.util.Collection
toArray
-
Constructor Details
-
AbstractByteSet
protected AbstractByteSet()
-
-
Method Details
-
iterator
public abstract it.unimi.dsi.fastutil.bytes.ByteIterator iterator()Description copied from interface:ByteSetReturns a type-specific iterator on the elements of this set.- Specified by:
iteratorin interfaceit.unimi.dsi.fastutil.bytes.ByteCollection- Specified by:
iteratorin interfaceit.unimi.dsi.fastutil.bytes.ByteIterable- Specified by:
iteratorin interfaceByteSet- Specified by:
iteratorin interfaceCollection<Byte>- Specified by:
iteratorin interfaceIterable<Byte>- Specified by:
iteratorin interfaceSet<Byte>- Specified by:
iteratorin classit.unimi.dsi.fastutil.bytes.AbstractByteCollection- 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(byte 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.