public static class IntCollections.SynchronizedCollection extends java.lang.Object implements IntCollection
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(int o)
A Type-Specific add function to reduce (un)boxing
|
boolean |
addAll(java.util.Collection<? extends java.lang.Integer> c) |
boolean |
addAll(int[] e,
int offset,
int length)
A Type-Specific Array based addAll method to reduce the amount of Wrapping
|
boolean |
addAll(IntCollection c)
A Type-Specific addAll function to reduce (un)boxing
|
void |
clear() |
boolean |
contains(int o)
A Type-Specific contains function to reduce (un)boxing
|
boolean |
containsAll(java.util.Collection<?> c)
Deprecated.
|
boolean |
containsAll(IntCollection c)
A Type-Specific containsAll function to reduce (un)boxing
|
boolean |
containsAny(java.util.Collection<?> c)
Deprecated.
|
boolean |
containsAny(IntCollection c)
A Type-Specific containsAny function to reduce (un)boxing
|
IntCollection |
copy()
A Function that does a shallow clone of the Collection itself.
|
int |
count(Int2BooleanFunction filter)
Helper function to reduce stream usage that allows to count the valid elements.
|
boolean |
equals(java.lang.Object obj) |
int |
findFirst(Int2BooleanFunction filter)
Helper function to reduce stream usage that allows to filter for the first match.
|
void |
forEach(java.util.function.Consumer<? super java.lang.Integer> action)
Deprecated.
|
<E> void |
forEach(E input,
ObjectIntConsumer<E> action)
Helper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.
|
void |
forEach(IntConsumer action)
A Type Specific foreach function that reduces (un)boxing
|
int |
hashCode() |
boolean |
isEmpty() |
IntIterator |
iterator()
Returns a Type-Specific Iterator to reduce (un)boxing
|
boolean |
matchesAll(Int2BooleanFunction filter)
Helper function to reduce stream usage that allows to filter for all matches.
|
boolean |
matchesAny(Int2BooleanFunction filter)
Helper function to reduce stream usage that allows to filter for any matches.
|
boolean |
matchesNone(Int2BooleanFunction filter)
Helper function to reduce stream usage that allows to filter for no matches.
|
int |
reduce(int identity,
IntIntUnaryOperator operator)
Performs a reduction on the
elements of this Iterable
|
int |
reduce(IntIntUnaryOperator 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 |
remInt(int 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(IntCollection c)
A Type-Specific removeAll function that reduces (un)boxing.
|
boolean |
removeAll(IntCollection c,
IntConsumer r)
A Type-Specific removeAll function that reduces (un)boxing.
|
boolean |
retainAll(java.util.Collection<?> c)
Deprecated.
|
boolean |
retainAll(IntCollection c)
A Type-Specific retainAll function that reduces (un)boxing.
|
boolean |
retainAll(IntCollection c,
IntConsumer r)
A Type-Specific retainAll function that reduces (un)boxing.
|
int |
size() |
java.lang.Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
int[] |
toIntArray()
A Type-Specific toArray function that delegates to
IntCollection.toIntArray(int[]) with a newly created array. |
int[] |
toIntArray(int[] 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, sortedpublic boolean add(int o)
IntCollectionadd in interface IntCollectiono - the element that should be addedpublic boolean addAll(java.util.Collection<? extends java.lang.Integer> c)
addAll in interface java.util.Collection<java.lang.Integer>public boolean addAll(IntCollection c)
IntCollectionaddAll in interface IntCollectionc - the collection of elements that should be addedpublic boolean addAll(int[] e,
int offset,
int length)
IntCollectionaddAll in interface IntCollectione - the elements that should be addedoffset - where to start within the arraylength - how many elements of the array should be addedpublic boolean contains(int o)
IntCollectioncontains in interface IntCollectiono - the element that is checked for@Deprecated public boolean containsAll(java.util.Collection<?> c)
containsAll in interface java.util.Collection<java.lang.Integer>@Deprecated public boolean containsAny(java.util.Collection<?> c)
IntCollectioncontainsAny in interface IntCollectionc - the collection of elements that should be tested forpublic boolean containsAll(IntCollection c)
IntCollectioncontainsAll in interface IntCollectionc - the collection of elements that should be tested forpublic boolean containsAny(IntCollection c)
IntCollectioncontainsAny in interface IntCollectionc - the collection of elements that should be tested forpublic int size()
size in interface java.util.Collection<java.lang.Integer>public boolean isEmpty()
isEmpty in interface java.util.Collection<java.lang.Integer>public IntIterator iterator()
IntCollectioniterator in interface java.lang.Iterable<java.lang.Integer>iterator in interface java.util.Collection<java.lang.Integer>iterator in interface IntCollectioniterator in interface IntIterableCollection.iterator()public IntCollection copy()
IntCollectioncopy in interface IntCollection@Deprecated public boolean remove(java.lang.Object o)
IntCollectionThis default implementation delegates to the corresponding type-specific function.
remove in interface java.util.Collection<java.lang.Integer>remove in interface IntCollection@Deprecated public boolean removeAll(java.util.Collection<?> c)
removeAll in interface java.util.Collection<java.lang.Integer>@Deprecated public boolean retainAll(java.util.Collection<?> c)
retainAll in interface java.util.Collection<java.lang.Integer>public boolean remInt(int o)
IntCollectionremInt in interface IntCollectiono - the element that should be removedCollection.remove(Object)public boolean removeAll(IntCollection c)
IntCollectionremoveAll in interface IntCollectionc - the collection of elements that should be removedCollection.removeAll(Collection)public boolean removeAll(IntCollection c, IntConsumer r)
IntCollectionremoveAll in interface IntCollectionc - the collection of elements that should be removedr - elements that got removedCollection.removeAll(Collection)public boolean retainAll(IntCollection c)
IntCollectionretainAll in interface IntCollectionc - the collection of elements that should be keptCollection.retainAll(Collection)public boolean retainAll(IntCollection c, IntConsumer r)
IntCollectionretainAll in interface IntCollectionc - the collection of elements that should be keptr - elements that got removedCollection.retainAll(Collection)public boolean remIf(java.util.function.IntPredicate filter)
IntCollectionRemoves elements that were selected by the filter
remIf in interface IntCollectionfilter - Filters the elements that should be removedCollection.removeIf(Predicate)public void clear()
clear in interface java.util.Collection<java.lang.Integer>public java.lang.Object[] toArray()
toArray in interface java.util.Collection<java.lang.Integer>public <T> T[] toArray(T[] a)
toArray in interface java.util.Collection<java.lang.Integer>public int[] toIntArray()
IntCollectionIntCollection.toIntArray(int[]) with a newly created array.toIntArray in interface IntCollectionCollection.toArray()public int[] toIntArray(int[] a)
IntCollectiontoIntArray in interface IntCollectiona - 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(IntConsumer action)
IntIterableforEach in interface IntIterableaction - The action to be performed for each elementIterable.forEach(Consumer)@Deprecated public void forEach(java.util.function.Consumer<? super java.lang.Integer> action)
IntIterableThis default implementation delegates to the corresponding type-specific function.
forEach in interface java.lang.Iterable<java.lang.Integer>forEach in interface IntIterablepublic int hashCode()
hashCode in interface java.util.Collection<java.lang.Integer>hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in interface java.util.Collection<java.lang.Integer>equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic <E> void forEach(E input,
ObjectIntConsumer<E> action)
IntIterableforEach in interface IntIterableE - the generic type of the Objectinput - the object that should be includedaction - The action to be performed for each elementpublic boolean matchesAny(Int2BooleanFunction filter)
IntIterablematchesAny in interface IntIterablefilter - that should be appliedpublic boolean matchesNone(Int2BooleanFunction filter)
IntIterablematchesNone in interface IntIterablefilter - that should be appliedpublic boolean matchesAll(Int2BooleanFunction filter)
IntIterablematchesAll in interface IntIterablefilter - that should be appliedpublic int reduce(int identity,
IntIntUnaryOperator operator)
IntIterablereduce in interface IntIterableidentity - the start valueoperator - the operation that should be appliedpublic int reduce(IntIntUnaryOperator operator)
IntIterablereduce in interface IntIterableoperator - the operation that should be appliedpublic int findFirst(Int2BooleanFunction filter)
IntIterablefindFirst in interface IntIterablefilter - that should be appliedpublic int count(Int2BooleanFunction filter)
IntIterablecount in interface IntIterablefilter - that should be applied