public static class LongCollections.UnmodifiableCollection extends java.lang.Object implements LongCollection
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(long o)
A Type-Specific add function to reduce (un)boxing
|
boolean |
addAll(java.util.Collection<? extends java.lang.Long> c) |
boolean |
addAll(long[] e,
int offset,
int length)
A Type-Specific Array based addAll method to reduce the amount of Wrapping
|
boolean |
addAll(LongCollection c)
A Type-Specific addAll function to reduce (un)boxing
|
void |
clear() |
boolean |
contains(long o)
A Type-Specific contains function to reduce (un)boxing
|
boolean |
containsAll(java.util.Collection<?> c)
Deprecated.
|
boolean |
containsAll(LongCollection c)
A Type-Specific containsAll function to reduce (un)boxing
|
boolean |
containsAny(java.util.Collection<?> c)
Deprecated.
|
boolean |
containsAny(LongCollection c)
A Type-Specific containsAny function to reduce (un)boxing
|
LongCollection |
copy()
A Function that does a shallow clone of the Collection itself.
|
int |
count(Long2BooleanFunction filter)
Helper function to reduce stream usage that allows to count the valid elements.
|
boolean |
equals(java.lang.Object obj) |
long |
findFirst(Long2BooleanFunction filter)
Helper function to reduce stream usage that allows to filter for the first match.
|
void |
forEach(java.util.function.Consumer<? super java.lang.Long> action)
Deprecated.
|
<E> void |
forEach(E input,
ObjectLongConsumer<E> action)
Helper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.
|
void |
forEach(LongConsumer action)
A Type Specific foreach function that reduces (un)boxing
|
int |
hashCode() |
boolean |
isEmpty() |
LongIterator |
iterator()
Returns a Type-Specific Iterator to reduce (un)boxing
|
boolean |
matchesAll(Long2BooleanFunction filter)
Helper function to reduce stream usage that allows to filter for all matches.
|
boolean |
matchesAny(Long2BooleanFunction filter)
Helper function to reduce stream usage that allows to filter for any matches.
|
boolean |
matchesNone(Long2BooleanFunction filter)
Helper function to reduce stream usage that allows to filter for no matches.
|
long |
reduce(long identity,
LongLongUnaryOperator operator)
Performs a reduction on the
elements of this Iterable
|
long |
reduce(LongLongUnaryOperator operator)
Performs a reduction on the
elements of this Iterable
|
boolean |
remIf(java.util.function.LongPredicate filter)
A Type-Specific removeIf function to reduce (un)boxing.
|
boolean |
remLong(long o)
A Type-Specific remove function that reduces (un)boxing.
|
boolean |
remove(java.lang.Object o)
Deprecated.
|
boolean |
removeAll(java.util.Collection<?> c)
Deprecated.
|
boolean |
removeAll(LongCollection c)
A Type-Specific removeAll function that reduces (un)boxing.
|
boolean |
removeAll(LongCollection c,
LongConsumer r)
A Type-Specific removeAll function that reduces (un)boxing.
|
boolean |
removeIf(java.util.function.Predicate<? super java.lang.Long> filter)
Deprecated.
|
boolean |
retainAll(java.util.Collection<?> c)
Deprecated.
|
boolean |
retainAll(LongCollection c)
A Type-Specific retainAll function that reduces (un)boxing.
|
boolean |
retainAll(LongCollection c,
LongConsumer r)
A Type-Specific retainAll function that reduces (un)boxing.
|
int |
size() |
java.lang.Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
long[] |
toLongArray()
A Type-Specific toArray function that delegates to
LongCollection.toLongArray(long[]) with a newly created array. |
long[] |
toLongArray(long[] 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, sortedpublic boolean add(long o)
LongCollectionadd in interface LongCollectiono - the element that should be addedpublic boolean addAll(java.util.Collection<? extends java.lang.Long> c)
addAll in interface java.util.Collection<java.lang.Long>public boolean addAll(LongCollection c)
LongCollectionaddAll in interface LongCollectionc - the collection of elements that should be addedpublic boolean addAll(long[] e,
int offset,
int length)
LongCollectionaddAll in interface LongCollectione - the elements that should be addedoffset - where to start within the arraylength - how many elements of the array should be addedpublic boolean contains(long o)
LongCollectioncontains in interface LongCollectiono - the element that is checked forpublic boolean containsAll(LongCollection c)
LongCollectioncontainsAll in interface LongCollectionc - the collection of elements that should be tested forpublic boolean containsAny(LongCollection c)
LongCollectioncontainsAny in interface LongCollectionc - the collection of elements that should be tested for@Deprecated public boolean containsAny(java.util.Collection<?> c)
LongCollectioncontainsAny in interface LongCollectionc - 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.Long>public int size()
size in interface java.util.Collection<java.lang.Long>public boolean isEmpty()
isEmpty in interface java.util.Collection<java.lang.Long>public LongIterator iterator()
LongCollectioniterator in interface java.lang.Iterable<java.lang.Long>iterator in interface java.util.Collection<java.lang.Long>iterator in interface LongCollectioniterator in interface LongIterableCollection.iterator()public LongCollection copy()
LongCollectioncopy in interface LongCollection@Deprecated public boolean remove(java.lang.Object o)
LongCollectionThis default implementation delegates to the corresponding type-specific function.
remove in interface java.util.Collection<java.lang.Long>remove in interface LongCollection@Deprecated public boolean removeAll(java.util.Collection<?> c)
removeAll in interface java.util.Collection<java.lang.Long>@Deprecated public boolean retainAll(java.util.Collection<?> c)
retainAll in interface java.util.Collection<java.lang.Long>@Deprecated public boolean removeIf(java.util.function.Predicate<? super java.lang.Long> filter)
LongCollectionThis default implementation delegates to the corresponding type-specific function.
removeIf in interface java.util.Collection<java.lang.Long>removeIf in interface LongCollectionpublic boolean remLong(long o)
LongCollectionremLong in interface LongCollectiono - the element that should be removedCollection.remove(Object)public boolean removeAll(LongCollection c)
LongCollectionremoveAll in interface LongCollectionc - the collection of elements that should be removedCollection.removeAll(Collection)public boolean removeAll(LongCollection c, LongConsumer r)
LongCollectionremoveAll in interface LongCollectionc - the collection of elements that should be removedr - elements that got removedCollection.removeAll(Collection)public boolean retainAll(LongCollection c)
LongCollectionretainAll in interface LongCollectionc - the collection of elements that should be keptCollection.retainAll(Collection)public boolean retainAll(LongCollection c, LongConsumer r)
LongCollectionretainAll in interface LongCollectionc - the collection of elements that should be keptr - elements that got removedCollection.retainAll(Collection)public boolean remIf(java.util.function.LongPredicate filter)
LongCollectionRemoves elements that were selected by the filter
remIf in interface LongCollectionfilter - Filters the elements that should be removedCollection.removeIf(Predicate)public void clear()
clear in interface java.util.Collection<java.lang.Long>public java.lang.Object[] toArray()
toArray in interface java.util.Collection<java.lang.Long>public <T> T[] toArray(T[] a)
toArray in interface java.util.Collection<java.lang.Long>public long[] toLongArray()
LongCollectionLongCollection.toLongArray(long[]) with a newly created array.toLongArray in interface LongCollectionCollection.toArray()public long[] toLongArray(long[] a)
LongCollectiontoLongArray in interface LongCollectiona - 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(LongConsumer action)
LongIterableforEach in interface LongIterableaction - The action to be performed for each elementIterable.forEach(Consumer)@Deprecated public void forEach(java.util.function.Consumer<? super java.lang.Long> action)
LongIterableThis default implementation delegates to the corresponding type-specific function.
forEach in interface java.lang.Iterable<java.lang.Long>forEach in interface LongIterablepublic int hashCode()
hashCode in interface java.util.Collection<java.lang.Long>hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in interface java.util.Collection<java.lang.Long>equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic <E> void forEach(E input,
ObjectLongConsumer<E> action)
LongIterableforEach in interface LongIterableE - the generic type of the Objectinput - the object that should be includedaction - The action to be performed for each elementpublic boolean matchesAny(Long2BooleanFunction filter)
LongIterablematchesAny in interface LongIterablefilter - that should be appliedpublic boolean matchesNone(Long2BooleanFunction filter)
LongIterablematchesNone in interface LongIterablefilter - that should be appliedpublic boolean matchesAll(Long2BooleanFunction filter)
LongIterablematchesAll in interface LongIterablefilter - that should be appliedpublic long reduce(long identity,
LongLongUnaryOperator operator)
LongIterablereduce in interface LongIterableidentity - the start valueoperator - the operation that should be appliedpublic long reduce(LongLongUnaryOperator operator)
LongIterablereduce in interface LongIterableoperator - the operation that should be appliedpublic long findFirst(Long2BooleanFunction filter)
LongIterablefindFirst in interface LongIterablefilter - that should be appliedpublic int count(Long2BooleanFunction filter)
LongIterablecount in interface LongIterablefilter - that should be applied