Package it.unimi.dsi.fastutil.bytes
Interface ByteSet
-
- All Superinterfaces:
ByteCollection
,ByteIterable
,Collection<Byte>
,Iterable<Byte>
,Set<Byte>
- All Known Subinterfaces:
ByteSortedSet
- All Known Implementing Classes:
AbstractByteSet
,AbstractByteSortedSet
,ByteArraySet
,ByteAVLTreeSet
,ByteLinkedOpenCustomHashSet
,ByteLinkedOpenHashSet
,ByteOpenCustomHashSet
,ByteOpenHashSet
,ByteRBTreeSet
,ByteSets.EmptySet
,ByteSets.Singleton
,ByteSets.SynchronizedSet
,ByteSets.UnmodifiableSet
,ByteSortedSets.EmptySet
,ByteSortedSets.Singleton
,ByteSortedSets.SynchronizedSortedSet
,ByteSortedSets.UnmodifiableSortedSet
public interface ByteSet extends ByteCollection, Set<Byte>
A type-specificSet
; provides some additional methods that use polymorphism to avoid (un)boxing.Additionally, this interface strengthens (again)
iterator()
.- See Also:
Set
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default boolean
add(Byte o)
Deprecated.Please use the corresponding type-specific method instead.default boolean
contains(Object o)
Deprecated.Please use the corresponding type-specific method instead.ByteIterator
iterator()
Returns a type-specific iterator on the elements of this set.default boolean
rem(byte k)
Deprecated.Please useremove()
instead.boolean
remove(byte k)
Removes an element from this set.default boolean
remove(Object o)
Deprecated.Please use the corresponding type-specific method instead.-
Methods inherited from interface it.unimi.dsi.fastutil.bytes.ByteCollection
add, addAll, contains, containsAll, removeAll, removeIf, removeIf, retainAll, toArray, toByteArray, toByteArray
-
Methods inherited from interface it.unimi.dsi.fastutil.bytes.ByteIterable
forEach, forEach
-
Methods inherited from interface java.util.Collection
parallelStream, stream, toArray
-
-
-
-
Method Detail
-
iterator
ByteIterator iterator()
Returns a type-specific iterator on the elements of this set.Note that this specification strengthens the one given in
Iterable.iterator()
, which was already strengthened in the corresponding type-specific class, but was weakened by the fact that this interface extendsSet
.- Specified by:
iterator
in interfaceByteCollection
- Specified by:
iterator
in interfaceByteIterable
- Specified by:
iterator
in interfaceCollection<Byte>
- Specified by:
iterator
in interfaceIterable<Byte>
- Specified by:
iterator
in interfaceSet<Byte>
- Returns:
- a type-specific iterator on the elements of this set.
- See Also:
Iterable.iterator()
-
remove
boolean remove(byte k)
Removes an element from this set.Note that the corresponding method of a type-specific collection is
rem()
. This unfortunate situation is caused by the clash with the similarly named index-based method in theList
interface.- See Also:
Collection.remove(Object)
-
remove
@Deprecated default boolean remove(Object o)
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
remove
in interfaceByteCollection
- Specified by:
remove
in interfaceCollection<Byte>
- Specified by:
remove
in interfaceSet<Byte>
-
add
@Deprecated default boolean add(Byte o)
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
add
in interfaceByteCollection
- Specified by:
add
in interfaceCollection<Byte>
- Specified by:
add
in interfaceSet<Byte>
-
contains
@Deprecated default boolean contains(Object o)
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
contains
in interfaceByteCollection
- Specified by:
contains
in interfaceCollection<Byte>
- Specified by:
contains
in interfaceSet<Byte>
-
rem
@Deprecated default boolean rem(byte k)
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.- Specified by:
rem
in interfaceByteCollection
- See Also:
Collection.remove(Object)
-
-