T - the type of elements maintained by this Collectionpublic static class ObjectCollections.SynchronizedCollection<T> extends java.lang.Object implements ObjectCollection<T>
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(T o) |
boolean |
addAll(java.util.Collection<? extends T> c) |
boolean |
addAll(ObjectCollection<T> c)
A Type-Specific addAll function to reduce (un)boxing
|
boolean |
addAll(T[] e,
int offset,
int length)
A Type-Specific Array based addAll method to reduce the amount of Wrapping
|
void |
clear() |
boolean |
contains(java.lang.Object o) |
boolean |
containsAll(java.util.Collection<?> c) |
boolean |
containsAll(ObjectCollection<T> c)
A Type-Specific containsAll function to reduce (un)boxing
|
boolean |
containsAny(java.util.Collection<?> c)
Returns true if any element of the Collection is found in the provided collection.
|
boolean |
containsAny(ObjectCollection<T> c)
A Type-Specific containsAny function to reduce (un)boxing
|
ObjectCollection<T> |
copy()
A Function that does a shallow clone of the Collection itself.
|
int |
count(Object2BooleanFunction<T> filter)
Helper function to reduce stream usage that allows to count the valid elements.
|
boolean |
equals(java.lang.Object obj) |
T |
findFirst(Object2BooleanFunction<T> filter)
Helper function to reduce stream usage that allows to filter for the first match.
|
void |
forEach(java.util.function.Consumer<? super T> action) |
<E> void |
forEach(E input,
ObjectObjectConsumer<E,T> action)
Helper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.
|
int |
hashCode() |
boolean |
isEmpty() |
ObjectIterator<T> |
iterator()
Returns a Type-Specific Iterator to reduce (un)boxing
|
boolean |
matchesAll(Object2BooleanFunction<T> filter)
Helper function to reduce stream usage that allows to filter for all matches.
|
boolean |
matchesAny(Object2BooleanFunction<T> filter)
Helper function to reduce stream usage that allows to filter for any matches.
|
boolean |
matchesNone(Object2BooleanFunction<T> filter)
Helper function to reduce stream usage that allows to filter for no matches.
|
<E> E |
reduce(E identity,
java.util.function.BiFunction<E,T,E> operator)
Performs a reduction on the
elements of this Iterable
|
T |
reduce(ObjectObjectUnaryOperator<T,T> operator)
Performs a reduction on the
elements of this Iterable
|
boolean |
remove(java.lang.Object o) |
boolean |
removeAll(java.util.Collection<?> c) |
boolean |
removeAll(ObjectCollection<T> c)
A Type-Specific removeAll function that reduces (un)boxing.
|
boolean |
removeAll(ObjectCollection<T> c,
java.util.function.Consumer<T> r)
A Type-Specific removeAll function that reduces (un)boxing.
|
boolean |
retainAll(java.util.Collection<?> c) |
boolean |
retainAll(ObjectCollection<T> c)
A Type-Specific retainAll function that reduces (un)boxing.
|
boolean |
retainAll(ObjectCollection<T> c,
java.util.function.Consumer<T> r)
A Type-Specific retainAll function that reduces (un)boxing.
|
int |
size() |
java.lang.Object[] |
toArray() |
<E> E[] |
toArray(E[] a) |
java.lang.String |
toString() |
addAll, addAll, pour, spliterator, synchronize, synchronize, toArray, unmodifiablearrayflatMap, asAsync, distinct, filter, flatMap, limit, map, peek, pourAsList, pourAsSet, sortedpublic boolean addAll(java.util.Collection<? extends T> c)
addAll in interface java.util.Collection<T>public boolean addAll(ObjectCollection<T> c)
ObjectCollectionaddAll in interface ObjectCollection<T>c - the collection of elements that should be addedpublic boolean addAll(T[] e, int offset, int length)
ObjectCollectionaddAll in interface ObjectCollection<T>e - the elements that should be addedoffset - where to start within the arraylength - how many elements of the array should be addedpublic boolean contains(java.lang.Object o)
contains in interface java.util.Collection<T>public boolean containsAll(java.util.Collection<?> c)
containsAll in interface java.util.Collection<T>public boolean containsAny(java.util.Collection<?> c)
ObjectCollectioncontainsAny in interface ObjectCollection<T>c - the collection of elements that should be tested forpublic boolean containsAll(ObjectCollection<T> c)
ObjectCollectioncontainsAll in interface ObjectCollection<T>c - the collection of elements that should be tested forpublic boolean containsAny(ObjectCollection<T> c)
ObjectCollectioncontainsAny in interface ObjectCollection<T>c - the collection of elements that should be tested forpublic int size()
size in interface java.util.Collection<T>public boolean isEmpty()
isEmpty in interface java.util.Collection<T>public ObjectIterator<T> iterator()
ObjectCollectioniterator in interface java.lang.Iterable<T>iterator in interface java.util.Collection<T>iterator in interface ObjectCollection<T>iterator in interface ObjectIterable<T>Collection.iterator()public ObjectCollection<T> copy()
ObjectCollectioncopy in interface ObjectCollection<T>public boolean remove(java.lang.Object o)
remove in interface java.util.Collection<T>public boolean removeAll(java.util.Collection<?> c)
removeAll in interface java.util.Collection<T>public boolean retainAll(java.util.Collection<?> c)
retainAll in interface java.util.Collection<T>public boolean removeAll(ObjectCollection<T> c)
ObjectCollectionremoveAll in interface ObjectCollection<T>c - the collection of elements that should be removedCollection.removeAll(Collection)public boolean removeAll(ObjectCollection<T> c, java.util.function.Consumer<T> r)
ObjectCollectionremoveAll in interface ObjectCollection<T>c - the collection of elements that should be removedr - elements that got removedCollection.removeAll(Collection)public boolean retainAll(ObjectCollection<T> c)
ObjectCollectionretainAll in interface ObjectCollection<T>c - the collection of elements that should be keptCollection.retainAll(Collection)public boolean retainAll(ObjectCollection<T> c, java.util.function.Consumer<T> r)
ObjectCollectionretainAll in interface ObjectCollection<T>c - the collection of elements that should be keptr - elements that got removedCollection.retainAll(Collection)public void clear()
clear in interface java.util.Collection<T>public java.lang.Object[] toArray()
toArray in interface java.util.Collection<T>public <E> E[] toArray(E[] a)
toArray in interface java.util.Collection<T>public void forEach(java.util.function.Consumer<? super T> action)
forEach in interface java.lang.Iterable<T>public int hashCode()
hashCode in interface java.util.Collection<T>hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in interface java.util.Collection<T>equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic <E> void forEach(E input,
ObjectObjectConsumer<E,T> action)
ObjectIterableforEach in interface ObjectIterable<T>E - the generic type of the Objectinput - the object that should be includedaction - The action to be performed for each elementpublic boolean matchesAny(Object2BooleanFunction<T> filter)
ObjectIterablematchesAny in interface ObjectIterable<T>filter - that should be appliedpublic boolean matchesNone(Object2BooleanFunction<T> filter)
ObjectIterablematchesNone in interface ObjectIterable<T>filter - that should be appliedpublic boolean matchesAll(Object2BooleanFunction<T> filter)
ObjectIterablematchesAll in interface ObjectIterable<T>filter - that should be appliedpublic <E> E reduce(E identity,
java.util.function.BiFunction<E,T,E> operator)
ObjectIterablereduce in interface ObjectIterable<T>E - the type of elements maintained by this Collectionidentity - the start valueoperator - the operation that should be appliedpublic T reduce(ObjectObjectUnaryOperator<T,T> operator)
ObjectIterablereduce in interface ObjectIterable<T>operator - the operation that should be appliedpublic T findFirst(Object2BooleanFunction<T> filter)
ObjectIterablefindFirst in interface ObjectIterable<T>filter - that should be appliedpublic int count(Object2BooleanFunction<T> filter)
ObjectIterablecount in interface ObjectIterable<T>filter - that should be applied