public interface LongCollection extends java.util.Collection<java.lang.Long>, LongIterable
Collection that reduces (un)boxing| Modifier and Type | Method and Description |
|---|---|
boolean |
add(long o)
A Type-Specific add function to reduce (un)boxing
|
default boolean |
add(java.lang.Long o)
Deprecated.
Please use the corresponding type-specific function instead.
|
default boolean |
addAll(long... e)
A Type-Specific Array based addAll method to reduce the amount of Wrapping
|
default boolean |
addAll(long[] e,
int length)
A Type-Specific Array based addAll method to reduce the amount of Wrapping
|
default 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
|
boolean |
contains(long o)
A Type-Specific contains function to reduce (un)boxing
|
default boolean |
contains(java.lang.Object o)
Deprecated.
Please use the corresponding type-specific function instead.
|
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.
|
LongIterator |
iterator()
Returns a Type-Specific Iterator to reduce (un)boxing
|
default java.util.stream.LongStream |
parallelPrimitiveStream()
Returns a Java-Type-Specific Parallel Stream to reduce boxing/unboxing.
|
default <E extends LongCollection> |
pour(E collection)
A Helper function to reduce the usage of Streams and allows to collect all elements
|
default java.util.stream.LongStream |
primitiveStream()
Returns a Java-Type-Specific Stream to reduce boxing/unboxing.
|
default 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.
|
default boolean |
remove(java.lang.Object o)
Deprecated.
Please use the corresponding type-specific function instead.
|
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.
|
default boolean |
removeIf(java.util.function.Predicate<? super java.lang.Long> filter)
Deprecated.
Please use the corresponding type-specific function instead.
|
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.
|
default LongSplititerator |
spliterator()
A Type Specific Type Splititerator to reduce boxing/unboxing
|
default LongCollection |
synchronize()
Creates a Wrapped Collection that is Synchronized
|
default LongCollection |
synchronize(java.lang.Object mutex)
Creates a Wrapped Collection that is Synchronized
|
long[] |
toLongArray()
A Type-Specific toArray function that delegates to
toLongArray(long[]) with a newly created array. |
long[] |
toLongArray(long[] a)
A Type-Specific toArray function that reduces (un)boxing.
|
default LongCollection |
unmodifiable()
Creates a Wrapped Collection that is unmodifiable
|
addAll, clear, containsAll, equals, hashCode, isEmpty, parallelStream, removeAll, retainAll, size, stream, toArray, toArrayarrayflatMap, asAsync, count, distinct, filter, findFirst, flatMap, forEach, forEach, forEach, limit, map, matchesAll, matchesAny, matchesNone, peek, pourAsList, pourAsSet, reduce, reduce, sortedboolean add(long o)
o - the element that should be addedboolean addAll(LongCollection c)
c - the collection of elements that should be addeddefault boolean addAll(long... e)
e - the elements that should be addeddefault boolean addAll(long[] e,
int length)
e - the elements that should be addedlength - how many elements of the array should be addeddefault boolean addAll(long[] e,
int offset,
int length)
e - the elements that should be addedoffset - where to start within the arraylength - how many elements of the array should be addedboolean contains(long o)
o - the element that is checked forboolean containsAll(LongCollection c)
c - the collection of elements that should be tested forboolean containsAny(LongCollection c)
c - the collection of elements that should be tested for@Deprecated boolean containsAny(java.util.Collection<?> c)
c - the collection of elements that should be tested forboolean remLong(long o)
o - the element that should be removedCollection.remove(Object)boolean removeAll(LongCollection c)
c - the collection of elements that should be removedCollection.removeAll(Collection)boolean removeAll(LongCollection c, LongConsumer r)
c - the collection of elements that should be removedr - elements that got removedCollection.removeAll(Collection)boolean retainAll(LongCollection c)
c - the collection of elements that should be keptCollection.retainAll(Collection)boolean retainAll(LongCollection c, LongConsumer r)
c - the collection of elements that should be keptr - elements that got removedCollection.retainAll(Collection)default <E extends LongCollection> E pour(E collection)
pour in interface LongIterableE - the collection typecollection - that the elements should be inserted toLongCollection copy()
long[] toLongArray()
toLongArray(long[]) with a newly created array.Collection.toArray()long[] toLongArray(long[] a)
a - array that the elements should be injected to. If null or to small a new array with the right size is createdCollection.toArray(Object[])@Deprecated default boolean removeIf(java.util.function.Predicate<? super java.lang.Long> filter)
This default implementation delegates to the corresponding type-specific function.
removeIf in interface java.util.Collection<java.lang.Long>default boolean remIf(java.util.function.LongPredicate filter)
Removes elements that were selected by the filter
filter - Filters the elements that should be removedjava.lang.NullPointerException - if filter is nullCollection.removeIf(Predicate)@Deprecated default boolean add(java.lang.Long o)
This default implementation delegates to the corresponding type-specific function.
add in interface java.util.Collection<java.lang.Long>@Deprecated default boolean contains(java.lang.Object o)
This default implementation delegates to the corresponding type-specific function.
contains in interface java.util.Collection<java.lang.Long>@Deprecated default boolean remove(java.lang.Object o)
This default implementation delegates to the corresponding type-specific function.
remove in interface java.util.Collection<java.lang.Long>LongIterator iterator()
iterator in interface java.util.Collection<java.lang.Long>iterator in interface java.lang.Iterable<java.lang.Long>iterator in interface LongIterableCollection.iterator()default LongCollection synchronize()
LongCollections.synchronize(speiger.src.collections.longs.collections.LongCollection)default LongCollection synchronize(java.lang.Object mutex)
mutex - is the controller of the synchronization blockLongCollections.synchronize(speiger.src.collections.longs.collections.LongCollection)default LongCollection unmodifiable()
LongCollections.unmodifiable(speiger.src.collections.longs.collections.LongCollection)default java.util.stream.LongStream primitiveStream()
default java.util.stream.LongStream parallelPrimitiveStream()
default LongSplititerator spliterator()
spliterator in interface java.util.Collection<java.lang.Long>spliterator in interface java.lang.Iterable<java.lang.Long>spliterator in interface LongIterable