public abstract static class ByteCollections.EmptyCollection extends AbstractByteCollection
This class may be useful to implement your own in case you subclass a type-specific collection.
| Modifier | Constructor and Description |
|---|---|
protected |
EmptyCollection() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addAll(ByteCollection c)
Adds all elements of the given type-specific collection to this collection.
|
boolean |
addAll(java.util.Collection<? extends java.lang.Byte> c) |
void |
clear() |
boolean |
contains(byte k)
Returns
true if this collection contains the specified element. |
boolean |
containsAll(ByteCollection c)
Checks whether this collection contains all elements from the given type-specific collection.
|
boolean |
containsAll(java.util.Collection<?> c) |
boolean |
equals(java.lang.Object o) |
void |
forEach(it.unimi.dsi.fastutil.bytes.ByteConsumer action)
Performs the given action for each element of this type-specific
Iterable
until all elements have been processed or the action throws an
exception. |
void |
forEach(java.util.function.Consumer<? super java.lang.Byte> action)
Deprecated.
|
int |
hashCode() |
it.unimi.dsi.fastutil.ints.IntIterator |
intIterator()
Returns a widened primitive iterator on the elements of this collection.
|
it.unimi.dsi.fastutil.ints.IntSpliterator |
intSpliterator()
Returns widened primitive spliterator on the elements of this collection.
|
ByteBidirectionalIterator |
iterator()
Returns a type-specific iterator on the elements of this collection.
|
boolean |
removeAll(ByteCollection c)
Remove from this collection all elements in the given type-specific collection.
|
boolean |
removeAll(java.util.Collection<?> c) |
boolean |
removeIf(BytePredicate filter)
Remove from this collection all elements which satisfy the given predicate.
|
boolean |
removeIf(java.util.function.Predicate<? super java.lang.Byte> filter)
Deprecated.
|
boolean |
retainAll(ByteCollection c)
Retains in this collection only elements from the given type-specific collection.
|
boolean |
retainAll(java.util.Collection<?> c) |
int |
size() |
it.unimi.dsi.fastutil.bytes.ByteSpliterator |
spliterator()
Returns a type-specific spliterator on the elements of this collection.
|
java.lang.Object[] |
toArray() |
<T> T[] |
toArray(T[] array) |
byte[] |
toByteArray()
Returns a primitive type array containing the items of this collection.
|
byte[] |
toByteArray(byte[] a)
Deprecated.
|
add, add, contains, rem, remove, toArray, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitintParallelStream, intStream, parallelStream, removeIf, streamforEachpublic boolean contains(byte k)
AbstractByteCollectiontrue if this collection contains the specified element.contains in interface ByteCollectioncontains in class AbstractByteCollectionCollection.contains(Object)public java.lang.Object[] toArray()
toArray in interface java.util.Collection<java.lang.Byte>toArray in class java.util.AbstractCollection<java.lang.Byte>public <T> T[] toArray(T[] array)
toArray in interface java.util.Collection<java.lang.Byte>toArray in class java.util.AbstractCollection<java.lang.Byte>public ByteBidirectionalIterator iterator()
ByteCollectioniterator in interface ByteCollectioniterator in interface ByteIterableiterator in interface java.lang.Iterable<java.lang.Byte>iterator in interface java.util.Collection<java.lang.Byte>iterator in class AbstractByteCollectionIterable.iterator()public it.unimi.dsi.fastutil.bytes.ByteSpliterator spliterator()
ByteCollectionSee Collection.spliterator() for more documentation on the requirements
of the returned spliterator.
public int size()
size in interface java.util.Collection<java.lang.Byte>size in class java.util.AbstractCollection<java.lang.Byte>public void clear()
clear in interface java.util.Collection<java.lang.Byte>clear in class java.util.AbstractCollection<java.lang.Byte>public int hashCode()
hashCode in interface java.util.Collection<java.lang.Byte>hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in interface java.util.Collection<java.lang.Byte>equals in class java.lang.Object@Deprecated public void forEach(java.util.function.Consumer<? super java.lang.Byte> action)
ByteIterablepublic boolean containsAll(java.util.Collection<?> c)
AbstractByteCollectioncontainsAll in interface java.util.Collection<java.lang.Byte>containsAll in class AbstractByteCollectionpublic boolean addAll(java.util.Collection<? extends java.lang.Byte> c)
AbstractByteCollectionaddAll in interface java.util.Collection<java.lang.Byte>addAll in class AbstractByteCollectionpublic boolean removeAll(java.util.Collection<?> c)
AbstractByteCollectionremoveAll in interface java.util.Collection<java.lang.Byte>removeAll in class AbstractByteCollectionpublic boolean retainAll(java.util.Collection<?> c)
AbstractByteCollectionretainAll in interface java.util.Collection<java.lang.Byte>retainAll in class AbstractByteCollection@Deprecated public boolean removeIf(java.util.function.Predicate<? super java.lang.Byte> filter)
ByteCollectionpublic byte[] toByteArray()
ByteCollectiontoByteArray in interface ByteCollectiontoByteArray in class AbstractByteCollectionCollection.toArray()@Deprecated public byte[] toByteArray(byte[] a)
AbstractByteCollectionNote that, contrarily to Collection.toArray(Object[]), this
methods just writes all elements of this collection: no special
value will be added after the last one.
toByteArray in interface ByteCollectiontoByteArray in class AbstractByteCollectiona - if this array is big enough, it will be used to store this collection.Collection.toArray(Object[])public void forEach(it.unimi.dsi.fastutil.bytes.ByteConsumer action)
ByteIterableIterable
until all elements have been processed or the action throws an
exception.action - the action to be performed for each element.Iterable.forEach(java.util.function.Consumer)public boolean containsAll(ByteCollection c)
ByteCollectioncontainsAll in interface ByteCollectioncontainsAll in class AbstractByteCollectionc - a type-specific collection.true if this collection contains all elements of the argument.Collection.containsAll(Collection)public boolean addAll(ByteCollection c)
ByteCollectionaddAll in interface ByteCollectionaddAll in class AbstractByteCollectionc - a type-specific collection.true if this collection changed as a result of the call.Collection.addAll(Collection)public boolean removeAll(ByteCollection c)
ByteCollectionremoveAll in interface ByteCollectionremoveAll in class AbstractByteCollectionc - a type-specific collection.true if this collection changed as a result of the call.Collection.removeAll(Collection)public boolean retainAll(ByteCollection c)
ByteCollectionretainAll in interface ByteCollectionretainAll in class AbstractByteCollectionc - a type-specific collection.true if this collection changed as a result of the call.Collection.retainAll(Collection)public boolean removeIf(BytePredicate filter)
ByteCollectionfilter - a predicate which returns true for elements to be
removed.true if any elements were removed.Collection.removeIf(java.util.function.Predicate)public it.unimi.dsi.fastutil.ints.IntIterator intIterator()
ByteCollection
This method is provided for the purpose of APIs that expect only the JDK's
primitive iterators, of which there are only int, long, and double.
public it.unimi.dsi.fastutil.ints.IntSpliterator intSpliterator()
ByteCollection
This method is provided for the purpose of APIs that expect only the JDK's
primitive spliterators, of which there are only int, long, and double.