public static class ShortCollections.UnmodifiableCollection extends java.lang.Object implements ShortCollection
ISizeProvider.CollectionSize| Modifier and Type | Method and Description |
|---|---|
boolean |
add(short o)
A Type-Specific add function to reduce (un)boxing
|
boolean |
addAll(java.util.Collection<? extends java.lang.Short> c) |
boolean |
addAll(short[] e,
int offset,
int length)
A Type-Specific Array based addAll method to reduce the amount of Wrapping
|
boolean |
addAll(ShortCollection c)
A Type-Specific addAll function to reduce (un)boxing
|
void |
clear() |
boolean |
contains(short o)
A Type-Specific contains function to reduce (un)boxing
|
boolean |
containsAll(java.util.Collection<?> c)
Deprecated.
|
boolean |
containsAll(ShortCollection c)
A Type-Specific containsAll function to reduce (un)boxing
|
boolean |
containsAny(java.util.Collection<?> c)
Deprecated.
|
boolean |
containsAny(ShortCollection c)
A Type-Specific containsAny function to reduce (un)boxing
|
ShortCollection |
copy()
A Function that does a shallow clone of the Collection itself.
|
int |
count(ShortPredicate filter)
Helper function to reduce stream usage that allows to count the valid elements.
|
boolean |
equals(java.lang.Object obj) |
short |
findFirst(ShortPredicate filter)
Helper function to reduce stream usage that allows to filter for the first match.
|
void |
forEach(java.util.function.Consumer<? super java.lang.Short> action)
Deprecated.
|
<E> void |
forEach(E input,
ObjectShortConsumer<E> action)
Helper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.
|
void |
forEach(ShortConsumer action)
A Type Specific foreach function that reduces (un)boxing
|
void |
forEachIndexed(IntShortConsumer action)
A Indexed forEach implementation that allows you to keep track of how many elements were already iterated over.
|
int |
hashCode() |
boolean |
isEmpty() |
ShortIterator |
iterator()
Returns a Type-Specific Iterator to reduce (un)boxing
|
boolean |
matchesAll(ShortPredicate filter)
Helper function to reduce stream usage that allows to filter for all matches.
|
boolean |
matchesAny(ShortPredicate filter)
Helper function to reduce stream usage that allows to filter for any matches.
|
boolean |
matchesNone(ShortPredicate filter)
Helper function to reduce stream usage that allows to filter for no matches.
|
short |
reduce(short identity,
ShortShortUnaryOperator operator)
Performs a reduction on the
elements of this Iterable
|
short |
reduce(ShortShortUnaryOperator operator)
Performs a reduction on the
elements of this Iterable
|
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(java.util.Collection<?> c)
Deprecated.
|
boolean |
removeAll(ShortCollection c)
A Type-Specific removeAll function that reduces (un)boxing.
|
boolean |
removeAll(ShortCollection c,
ShortConsumer r)
A Type-Specific removeAll function that reduces (un)boxing.
|
boolean |
removeIf(java.util.function.Predicate<? super java.lang.Short> filter)
Deprecated.
|
boolean |
remShort(short o)
A Type-Specific remove function that reduces (un)boxing.
|
boolean |
retainAll(java.util.Collection<?> c)
Deprecated.
|
boolean |
retainAll(ShortCollection c)
A Type-Specific retainAll function that reduces (un)boxing.
|
boolean |
retainAll(ShortCollection c,
ShortConsumer r)
A Type-Specific retainAll function that reduces (un)boxing.
|
int |
size() |
java.lang.Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
short[] |
toShortArray()
A Type-Specific toArray function that delegates to
ShortCollection.toShortArray(short[]) with a newly created array. |
short[] |
toShortArray(short[] a)
A Type-Specific toArray function that reduces (un)boxing.
|
java.lang.String |
toString() |
add, addAll, addAll, contains, parallelPrimitiveStream, pour, primitiveStream, spliterator, synchronize, synchronize, unmodifiablearrayflatMap, asAsync, distinct, filter, flatMap, limit, map, peek, pourAsList, pourAsSet, repeat, sortedofpublic boolean add(short o)
ShortCollectionadd in interface ShortCollectiono - the element that should be addedpublic boolean addAll(java.util.Collection<? extends java.lang.Short> c)
addAll in interface java.util.Collection<java.lang.Short>public boolean addAll(ShortCollection c)
ShortCollectionaddAll in interface ShortCollectionc - the collection of elements that should be addedpublic boolean addAll(short[] e,
int offset,
int length)
ShortCollectionaddAll in interface ShortCollectione - the elements that should be addedoffset - where to start within the arraylength - how many elements of the array should be addedpublic boolean contains(short o)
ShortCollectioncontains in interface ShortCollectiono - the element that is checked forpublic boolean containsAll(ShortCollection c)
ShortCollectioncontainsAll in interface ShortCollectionc - the collection of elements that should be tested forpublic boolean containsAny(ShortCollection c)
ShortCollectioncontainsAny in interface ShortCollectionc - the collection of elements that should be tested for@Deprecated public boolean containsAny(java.util.Collection<?> c)
ShortCollectioncontainsAny in interface ShortCollectionc - the collection of elements that should be tested for@Deprecated public boolean containsAll(java.util.Collection<?> c)
containsAll in interface java.util.Collection<java.lang.Short>public int size()
size in interface java.util.Collection<java.lang.Short>size in interface ISizeProviderpublic boolean isEmpty()
isEmpty in interface java.util.Collection<java.lang.Short>public ShortIterator iterator()
ShortCollectioniterator in interface java.lang.Iterable<java.lang.Short>iterator in interface java.util.Collection<java.lang.Short>iterator in interface ShortCollectioniterator in interface ShortIterableCollection.iterator()public ShortCollection copy()
ShortCollectioncopy in interface ShortCollection@Deprecated public boolean remove(java.lang.Object o)
ShortCollectionThis default implementation delegates to the corresponding type-specific function.
remove in interface java.util.Collection<java.lang.Short>remove in interface ShortCollection@Deprecated public boolean removeAll(java.util.Collection<?> c)
removeAll in interface java.util.Collection<java.lang.Short>@Deprecated public boolean retainAll(java.util.Collection<?> c)
retainAll in interface java.util.Collection<java.lang.Short>@Deprecated public boolean removeIf(java.util.function.Predicate<? super java.lang.Short> filter)
ShortCollectionThis default implementation delegates to the corresponding type-specific function.
removeIf in interface java.util.Collection<java.lang.Short>removeIf in interface ShortCollectionpublic boolean remShort(short o)
ShortCollectionremShort in interface ShortCollectiono - the element that should be removedCollection.remove(Object)public boolean removeAll(ShortCollection c)
ShortCollectionremoveAll in interface ShortCollectionc - the collection of elements that should be removedCollection.removeAll(Collection)public boolean removeAll(ShortCollection c, ShortConsumer r)
ShortCollectionremoveAll in interface ShortCollectionc - the collection of elements that should be removedr - elements that got removedCollection.removeAll(Collection)public boolean retainAll(ShortCollection c)
ShortCollectionretainAll in interface ShortCollectionc - the collection of elements that should be keptCollection.retainAll(Collection)public boolean retainAll(ShortCollection c, ShortConsumer r)
ShortCollectionretainAll in interface ShortCollectionc - the collection of elements that should be keptr - elements that got removedCollection.retainAll(Collection)public boolean remIf(java.util.function.IntPredicate filter)
ShortCollectionRemoves elements that were selected by the filter
remIf in interface ShortCollectionfilter - Filters the elements that should be removedCollection.removeIf(Predicate)public void clear()
clear in interface java.util.Collection<java.lang.Short>public java.lang.Object[] toArray()
toArray in interface java.util.Collection<java.lang.Short>public <T> T[] toArray(T[] a)
toArray in interface java.util.Collection<java.lang.Short>public short[] toShortArray()
ShortCollectionShortCollection.toShortArray(short[]) with a newly created array.toShortArray in interface ShortCollectiontoShortArray in interface ShortIterableCollection.toArray()public short[] toShortArray(short[] a)
ShortCollectiontoShortArray in interface ShortCollectiona - 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(ShortConsumer action)
ShortIterableforEach in interface ShortIterableaction - The action to be performed for each elementIterable.forEach(Consumer)@Deprecated public void forEach(java.util.function.Consumer<? super java.lang.Short> action)
ShortIterableThis default implementation delegates to the corresponding type-specific function.
forEach in interface java.lang.Iterable<java.lang.Short>forEach in interface ShortIterablepublic void forEachIndexed(IntShortConsumer action)
ShortIterableforEachIndexed in interface ShortIterableaction - The action to be performed for each elementpublic int hashCode()
hashCode in interface java.util.Collection<java.lang.Short>hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in interface java.util.Collection<java.lang.Short>equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic <E> void forEach(E input,
ObjectShortConsumer<E> action)
ShortIterableforEach in interface ShortIterableE - the generic type of the Objectinput - the object that should be includedaction - The action to be performed for each elementpublic boolean matchesAny(ShortPredicate filter)
ShortIterablematchesAny in interface ShortIterablefilter - that should be appliedpublic boolean matchesNone(ShortPredicate filter)
ShortIterablematchesNone in interface ShortIterablefilter - that should be appliedpublic boolean matchesAll(ShortPredicate filter)
ShortIterablematchesAll in interface ShortIterablefilter - that should be appliedpublic short reduce(short identity,
ShortShortUnaryOperator operator)
ShortIterablereduce in interface ShortIterableidentity - the start valueoperator - the operation that should be appliedpublic short reduce(ShortShortUnaryOperator operator)
ShortIterablereduce in interface ShortIterableoperator - the operation that should be appliedpublic short findFirst(ShortPredicate filter)
ShortIterablefindFirst in interface ShortIterablefilter - that should be appliedpublic int count(ShortPredicate filter)
ShortIterablecount in interface ShortIterablefilter - that should be applied