public static class ByteCollections.SynchronizedCollection extends java.lang.Object implements ByteCollection
ISizeProvider.CollectionSize| Modifier and Type | Method and Description |
|---|---|
boolean |
add(byte o)
A Type-Specific add function to reduce (un)boxing
|
boolean |
addAll(byte[] e,
int offset,
int length)
A Type-Specific Array based addAll method to reduce the amount of Wrapping
|
boolean |
addAll(ByteCollection c)
A Type-Specific addAll function to reduce (un)boxing
|
boolean |
addAll(java.util.Collection<? extends java.lang.Byte> c) |
void |
clear() |
boolean |
contains(byte o)
A Type-Specific contains function to reduce (un)boxing
|
boolean |
containsAll(ByteCollection c)
A Type-Specific containsAll function to reduce (un)boxing
|
boolean |
containsAll(java.util.Collection<?> c)
Deprecated.
|
boolean |
containsAny(ByteCollection c)
A Type-Specific containsAny function to reduce (un)boxing
|
boolean |
containsAny(java.util.Collection<?> c)
Deprecated.
|
ByteCollection |
copy()
A Function that does a shallow clone of the Collection itself.
|
int |
count(BytePredicate filter)
Helper function to reduce stream usage that allows to count the valid elements.
|
boolean |
equals(java.lang.Object obj) |
byte |
findFirst(BytePredicate filter)
Helper function to reduce stream usage that allows to filter for the first match.
|
void |
forEach(ByteConsumer action)
A Type Specific foreach function that reduces (un)boxing
|
void |
forEach(java.util.function.Consumer<? super java.lang.Byte> action)
Deprecated.
|
<E> void |
forEach(E input,
ObjectByteConsumer<E> action)
Helper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.
|
void |
forEachIndexed(IntByteConsumer action)
A Indexed forEach implementation that allows you to keep track of how many elements were already iterated over.
|
int |
hashCode() |
boolean |
isEmpty() |
ByteIterator |
iterator()
Returns a Type-Specific Iterator to reduce (un)boxing
|
boolean |
matchesAll(BytePredicate filter)
Helper function to reduce stream usage that allows to filter for all matches.
|
boolean |
matchesAny(BytePredicate filter)
Helper function to reduce stream usage that allows to filter for any matches.
|
boolean |
matchesNone(BytePredicate filter)
Helper function to reduce stream usage that allows to filter for no matches.
|
byte |
reduce(byte identity,
ByteByteUnaryOperator operator)
Performs a reduction on the
elements of this Iterable
|
byte |
reduce(ByteByteUnaryOperator operator)
Performs a reduction on the
elements of this Iterable
|
boolean |
remByte(byte o)
A Type-Specific remove function that reduces (un)boxing.
|
boolean |
remIf(java.util.function.IntPredicate filter)
A Type-Specific removeIf function to reduce (un)boxing.
|
boolean |
remove(java.lang.Object o)
Deprecated.
|
boolean |
removeAll(ByteCollection c)
A Type-Specific removeAll function that reduces (un)boxing.
|
boolean |
removeAll(ByteCollection c,
ByteConsumer r)
A Type-Specific removeAll function that reduces (un)boxing.
|
boolean |
removeAll(java.util.Collection<?> c)
Deprecated.
|
boolean |
retainAll(ByteCollection c)
A Type-Specific retainAll function that reduces (un)boxing.
|
boolean |
retainAll(ByteCollection c,
ByteConsumer r)
A Type-Specific retainAll function that reduces (un)boxing.
|
boolean |
retainAll(java.util.Collection<?> c)
Deprecated.
|
int |
size() |
java.lang.Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
byte[] |
toByteArray()
A Type-Specific toArray function that delegates to
ByteCollection.toByteArray(byte[]) with a newly created array. |
byte[] |
toByteArray(byte[] a)
A Type-Specific toArray function that reduces (un)boxing.
|
java.lang.String |
toString() |
add, addAll, addAll, contains, parallelPrimitiveStream, pour, primitiveStream, removeIf, spliterator, synchronize, synchronize, unmodifiablearrayflatMap, asAsync, distinct, filter, flatMap, limit, map, peek, pourAsList, pourAsSet, repeat, sortedofpublic boolean add(byte o)
ByteCollectionadd in interface ByteCollectiono - the element that should be addedpublic boolean addAll(java.util.Collection<? extends java.lang.Byte> c)
addAll in interface java.util.Collection<java.lang.Byte>public boolean addAll(ByteCollection c)
ByteCollectionaddAll in interface ByteCollectionc - the collection of elements that should be addedpublic boolean addAll(byte[] e,
int offset,
int length)
ByteCollectionaddAll in interface ByteCollectione - the elements that should be addedoffset - where to start within the arraylength - how many elements of the array should be addedpublic boolean contains(byte o)
ByteCollectioncontains in interface ByteCollectiono - the element that is checked for@Deprecated public boolean containsAll(java.util.Collection<?> c)
containsAll in interface java.util.Collection<java.lang.Byte>@Deprecated public boolean containsAny(java.util.Collection<?> c)
ByteCollectioncontainsAny in interface ByteCollectionc - the collection of elements that should be tested forpublic boolean containsAll(ByteCollection c)
ByteCollectioncontainsAll in interface ByteCollectionc - the collection of elements that should be tested forpublic boolean containsAny(ByteCollection c)
ByteCollectioncontainsAny in interface ByteCollectionc - the collection of elements that should be tested forpublic int size()
size in interface java.util.Collection<java.lang.Byte>size in interface ISizeProviderpublic boolean isEmpty()
isEmpty in interface java.util.Collection<java.lang.Byte>public ByteIterator iterator()
ByteCollectioniterator in interface java.lang.Iterable<java.lang.Byte>iterator in interface java.util.Collection<java.lang.Byte>iterator in interface ByteCollectioniterator in interface ByteIterableCollection.iterator()public ByteCollection copy()
ByteCollectioncopy in interface ByteCollection@Deprecated public boolean remove(java.lang.Object o)
ByteCollectionThis default implementation delegates to the corresponding type-specific function.
remove in interface java.util.Collection<java.lang.Byte>remove in interface ByteCollection@Deprecated public boolean removeAll(java.util.Collection<?> c)
removeAll in interface java.util.Collection<java.lang.Byte>@Deprecated public boolean retainAll(java.util.Collection<?> c)
retainAll in interface java.util.Collection<java.lang.Byte>public boolean remByte(byte o)
ByteCollectionremByte in interface ByteCollectiono - the element that should be removedCollection.remove(Object)public boolean removeAll(ByteCollection c)
ByteCollectionremoveAll in interface ByteCollectionc - the collection of elements that should be removedCollection.removeAll(Collection)public boolean removeAll(ByteCollection c, ByteConsumer r)
ByteCollectionremoveAll in interface ByteCollectionc - the collection of elements that should be removedr - elements that got removedCollection.removeAll(Collection)public boolean retainAll(ByteCollection c)
ByteCollectionretainAll in interface ByteCollectionc - the collection of elements that should be keptCollection.retainAll(Collection)public boolean retainAll(ByteCollection c, ByteConsumer r)
ByteCollectionretainAll in interface ByteCollectionc - the collection of elements that should be keptr - elements that got removedCollection.retainAll(Collection)public boolean remIf(java.util.function.IntPredicate filter)
ByteCollectionRemoves elements that were selected by the filter
remIf in interface ByteCollectionfilter - Filters the elements that should be removedCollection.removeIf(Predicate)public void clear()
clear in interface java.util.Collection<java.lang.Byte>public java.lang.Object[] toArray()
toArray in interface java.util.Collection<java.lang.Byte>public <T> T[] toArray(T[] a)
toArray in interface java.util.Collection<java.lang.Byte>public byte[] toByteArray()
ByteCollectionByteCollection.toByteArray(byte[]) with a newly created array.toByteArray in interface ByteCollectiontoByteArray in interface ByteIterableCollection.toArray()public byte[] toByteArray(byte[] a)
ByteCollectiontoByteArray in interface ByteCollectiona - array that the elements should be injected to. If null or to small a new array with the right size is createdCollection.toArray(Object[])public void forEach(ByteConsumer action)
ByteIterableforEach in interface ByteIterableaction - The action to be performed for each elementIterable.forEach(Consumer)@Deprecated public void forEach(java.util.function.Consumer<? super java.lang.Byte> action)
ByteIterableThis default implementation delegates to the corresponding type-specific function.
forEach in interface java.lang.Iterable<java.lang.Byte>forEach in interface ByteIterablepublic void forEachIndexed(IntByteConsumer action)
ByteIterableforEachIndexed in interface ByteIterableaction - The action to be performed for each elementpublic int hashCode()
hashCode in interface java.util.Collection<java.lang.Byte>hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in interface java.util.Collection<java.lang.Byte>equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic <E> void forEach(E input,
ObjectByteConsumer<E> action)
ByteIterableforEach in interface ByteIterableE - the generic type of the Objectinput - the object that should be includedaction - The action to be performed for each elementpublic boolean matchesAny(BytePredicate filter)
ByteIterablematchesAny in interface ByteIterablefilter - that should be appliedpublic boolean matchesNone(BytePredicate filter)
ByteIterablematchesNone in interface ByteIterablefilter - that should be appliedpublic boolean matchesAll(BytePredicate filter)
ByteIterablematchesAll in interface ByteIterablefilter - that should be appliedpublic byte reduce(byte identity,
ByteByteUnaryOperator operator)
ByteIterablereduce in interface ByteIterableidentity - the start valueoperator - the operation that should be appliedpublic byte reduce(ByteByteUnaryOperator operator)
ByteIterablereduce in interface ByteIterableoperator - the operation that should be appliedpublic byte findFirst(BytePredicate filter)
ByteIterablefindFirst in interface ByteIterablefilter - that should be appliedpublic int count(BytePredicate filter)
ByteIterablecount in interface ByteIterablefilter - that should be applied