public abstract class AbstractByteSet extends AbstractByteCollection implements java.lang.Cloneable, ByteSet
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()
).
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
int |
hashCode()
Returns a hash code for this set.
|
abstract ByteIterator |
iterator()
Returns a type-specific iterator on the elements of this collection.
|
boolean |
rem(byte k)
Deprecated.
Please use
remove() instead. |
boolean |
remove(byte k)
Removes an element from this set.
|
add, add, addAll, addAll, contains, contains, containsAll, containsAll, remove, removeAll, removeAll, retainAll, retainAll, toArray, toByteArray, toByteArray, toString
add, contains, of, of, of, of, of, remove, spliterator
add, addAll, contains, containsAll, intIterator, intParallelStream, intSpliterator, intStream, parallelStream, removeAll, removeIf, removeIf, removeIf, retainAll, stream, toArray, toByteArray, toByteArray
forEach, forEach, forEach
public abstract ByteIterator iterator()
ByteCollection
iterator
in interface ByteCollection
iterator
in interface ByteIterable
iterator
in interface ByteSet
iterator
in interface java.lang.Iterable<java.lang.Byte>
iterator
in interface java.util.Collection<java.lang.Byte>
iterator
in interface java.util.Set<java.lang.Byte>
iterator
in class AbstractByteCollection
Iterable.iterator()
public boolean equals(java.lang.Object o)
equals
in interface java.util.Collection<java.lang.Byte>
equals
in interface java.util.Set<java.lang.Byte>
equals
in class java.lang.Object
public int hashCode()
hashCode
in interface java.util.Collection<java.lang.Byte>
hashCode
in interface java.util.Set<java.lang.Byte>
hashCode
in class java.lang.Object
public boolean remove(byte k)
rem()
method
implemented by type-specific abstract Collection
superclass.@Deprecated public boolean rem(byte k)
remove()
instead.Note that this method should be called remove()
, but the clash
with the similarly named index-based method in the List
interface
forces us to use a distinguished name. For simplicity, the set interfaces reinstates
remove()
.
Delegates to the type-specific remove()
method
specified in the type-specific Set
interface.
rem
in interface ByteCollection
rem
in interface ByteSet
rem
in class AbstractByteCollection
Collection.remove(Object)