Modul speiger.src.collections
Klasse ObjectCollections.SynchronizedCollection<T>
java.lang.Object
speiger.src.collections.objects.utils.ObjectCollections.SynchronizedCollection<T>
- Typparameter:
T- the keyType of elements maintained by this Collection
- Alle implementierten Schnittstellen:
Iterable<T>,Collection<T>,ObjectCollection<T>,ObjectIterable<T>,ISizeProvider
- Umschließende Klasse:
ObjectCollections
public static class ObjectCollections.SynchronizedCollection<T>
extends Object
implements ObjectCollection<T>
Synchronized Collection Wrapper for the synchronizedCollection function
-
Verschachtelte Klassen - Übersicht
Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen speiger.src.collections.utils.ISizeProvider
ISizeProvider.CollectionSize -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungbooleanbooleanaddAll(Collection<? extends T> c) booleanaddAll(ObjectCollection<T> c) A Type-Specific addAll function to reduce (un)boxingbooleanA Type-Specific Array based addAll method to reduce the amount of Wrappingvoidclear()booleanbooleancontainsAll(Collection<?> c) booleanA Type-Specific containsAll function to reduce (un)boxingbooleancontainsAny(Collection<?> c) Returns true if any element of the Collection is found in the provided collection.booleanA Type-Specific containsAny function to reduce (un)boxingcopy()A Function that does a shallow clone of the Collection itself.intHelper function to reduce stream usage that allows to count the valid elements.booleanHelper function to reduce stream usage that allows to filter for the first match.<E> voidforEach(E input, ObjectObjectConsumer<E, T> action) Helper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.voidvoidforEachIndexed(IntObjectConsumer<T> action) A Indexed forEach implementation that allows you to keep track of how many elements were already iterated over.inthashCode()booleanisEmpty()iterator()Returns a Type-Specific Iterator to reduce (un)boxingbooleanmatchesAll(Predicate<T> filter) Helper function to reduce stream usage that allows to filter for all matches.booleanmatchesAny(Predicate<T> filter) Helper function to reduce stream usage that allows to filter for any matches.booleanmatchesNone(Predicate<T> filter) Helper function to reduce stream usage that allows to filter for no matches.<E> Ereduce(E identity, BiFunction<E, T, E> operator) Performs a reduction on the elements of this Iterablereduce(ObjectObjectUnaryOperator<T, T> operator) Performs a reduction on the elements of this IterablebooleanbooleanremoveAll(Collection<?> c) booleanA Type-Specific removeAll function that reduces (un)boxing.booleanremoveAll(ObjectCollection<T> c, Consumer<T> r) A Type-Specific removeAll function that reduces (un)boxing.booleanretainAll(Collection<?> c) booleanA Type-Specific retainAll function that reduces (un)boxing.booleanretainAll(ObjectCollection<T> c, Consumer<T> r) A Type-Specific retainAll function that reduces (un)boxing.intsize()Object[]toArray()<E> E[]toArray(E[] a) toString()Von Schnittstelle geerbte Methoden java.util.Collection
parallelStream, removeIf, streamVon Schnittstelle geerbte Methoden speiger.src.collections.objects.collections.ObjectCollection
addAll, addAll, pour, spliterator, synchronize, synchronize, toArray, unmodifiableVon Schnittstelle geerbte Methoden speiger.src.collections.objects.collections.ObjectIterable
arrayflatMap, asAsync, distinct, filter, flatMap, limit, map, mapToBoolean, mapToByte, mapToDouble, mapToFloat, mapToInt, mapToLong, mapToShort, peek, pourAsList, pourAsSet, repeat, sorted
-
Methodendetails
-
add
- Angegeben von:
addin SchnittstelleCollection<T>
-
addAll
- Angegeben von:
addAllin SchnittstelleCollection<T>
-
addAll
Beschreibung aus Schnittstelle kopiert:ObjectCollectionA Type-Specific addAll function to reduce (un)boxing- Angegeben von:
addAllin SchnittstelleObjectCollection<T>- Parameter:
c- the collection of elements that should be added- Gibt zurück:
- true if elements were added into the collection
-
addAll
Beschreibung aus Schnittstelle kopiert:ObjectCollectionA Type-Specific Array based addAll method to reduce the amount of Wrapping- Angegeben von:
addAllin SchnittstelleObjectCollection<T>- Parameter:
e- the elements that should be addedoffset- where to start within the arraylength- how many elements of the array should be added- Gibt zurück:
- if the collection was modified
-
contains
- Angegeben von:
containsin SchnittstelleCollection<T>
-
containsAll
- Angegeben von:
containsAllin SchnittstelleCollection<T>
-
containsAny
Beschreibung aus Schnittstelle kopiert:ObjectCollectionReturns true if any element of the Collection is found in the provided collection. A Small Optimization function to find out of any element is present when comparing collections and not all of them.- Angegeben von:
containsAnyin SchnittstelleObjectCollection<T>- Parameter:
c- the collection of elements that should be tested for- Gibt zurück:
- true if any element was found.
-
containsAll
Beschreibung aus Schnittstelle kopiert:ObjectCollectionA Type-Specific containsAll function to reduce (un)boxing- Angegeben von:
containsAllin SchnittstelleObjectCollection<T>- Parameter:
c- the collection of elements that should be tested for- Gibt zurück:
- true if all the element is found in the collection
-
containsAny
Beschreibung aus Schnittstelle kopiert:ObjectCollectionA Type-Specific containsAny function to reduce (un)boxing- Angegeben von:
containsAnyin SchnittstelleObjectCollection<T>- Parameter:
c- the collection of elements that should be tested for- Gibt zurück:
- true if any element was found
-
size
public int size()- Angegeben von:
sizein SchnittstelleCollection<T>- Angegeben von:
sizein SchnittstelleISizeProvider- Gibt zurück:
- the size of the implementing Collection
-
isEmpty
public boolean isEmpty()- Angegeben von:
isEmptyin SchnittstelleCollection<T>
-
iterator
Beschreibung aus Schnittstelle kopiert:ObjectCollectionReturns a Type-Specific Iterator to reduce (un)boxing- Angegeben von:
iteratorin SchnittstelleCollection<T>- Angegeben von:
iteratorin SchnittstelleIterable<T>- Angegeben von:
iteratorin SchnittstelleObjectCollection<T>- Angegeben von:
iteratorin SchnittstelleObjectIterable<T>- Gibt zurück:
- a iterator of the collection
- Siehe auch:
-
copy
Beschreibung aus Schnittstelle kopiert:ObjectCollectionA Function that does a shallow clone of the Collection itself. This function is more optimized then a copy constructor since the Collection does not have to be unsorted/resorted. It can be compared to Cloneable but with less exception risk- Angegeben von:
copyin SchnittstelleObjectCollection<T>- Gibt zurück:
- a Shallow Copy of the collection
-
remove
- Angegeben von:
removein SchnittstelleCollection<T>
-
removeAll
- Angegeben von:
removeAllin SchnittstelleCollection<T>
-
retainAll
- Angegeben von:
retainAllin SchnittstelleCollection<T>
-
removeAll
Beschreibung aus Schnittstelle kopiert:ObjectCollectionA Type-Specific removeAll function that reduces (un)boxing.- Angegeben von:
removeAllin SchnittstelleObjectCollection<T>- Parameter:
c- the collection of elements that should be removed- Gibt zurück:
- true if any element was removed
- Siehe auch:
-
removeAll
Beschreibung aus Schnittstelle kopiert:ObjectCollectionA Type-Specific removeAll function that reduces (un)boxing. It also notifies the remover of which exact element is going to be removed.- Angegeben von:
removeAllin SchnittstelleObjectCollection<T>- Parameter:
c- the collection of elements that should be removedr- elements that got removed- Gibt zurück:
- true if any element was removed
- Siehe auch:
-
retainAll
Beschreibung aus Schnittstelle kopiert:ObjectCollectionA Type-Specific retainAll function that reduces (un)boxing.- Angegeben von:
retainAllin SchnittstelleObjectCollection<T>- Parameter:
c- the collection of elements that should be kept- Gibt zurück:
- true if any element was removed
- Siehe auch:
-
retainAll
Beschreibung aus Schnittstelle kopiert:ObjectCollectionA Type-Specific retainAll function that reduces (un)boxing. It also notifies the remover of which exact element is going to be removed.- Angegeben von:
retainAllin SchnittstelleObjectCollection<T>- Parameter:
c- the collection of elements that should be keptr- elements that got removed- Gibt zurück:
- true if any element was removed
- Siehe auch:
-
clear
public void clear()- Angegeben von:
clearin SchnittstelleCollection<T>
-
toArray
- Angegeben von:
toArrayin SchnittstelleCollection<T>
-
toArray
public <E> E[] toArray(E[] a) - Angegeben von:
toArrayin SchnittstelleCollection<T>
-
forEach
-
forEachIndexed
Beschreibung aus Schnittstelle kopiert:ObjectIterableA Indexed forEach implementation that allows you to keep track of how many elements were already iterated over.- Angegeben von:
forEachIndexedin SchnittstelleObjectIterable<T>- Parameter:
action- The action to be performed for each element
-
hashCode
public int hashCode()- Angegeben von:
hashCodein SchnittstelleCollection<T>- Setzt außer Kraft:
hashCodein KlasseObject
-
equals
- Angegeben von:
equalsin SchnittstelleCollection<T>- Setzt außer Kraft:
equalsin KlasseObject
-
toString
-
forEach
Beschreibung aus Schnittstelle kopiert:ObjectIterableHelper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.- Angegeben von:
forEachin SchnittstelleObjectIterable<T>- Typparameter:
E- the generic type of the Object- Parameter:
input- the object that should be includedaction- The action to be performed for each element
-
matchesAny
Beschreibung aus Schnittstelle kopiert:ObjectIterableHelper function to reduce stream usage that allows to filter for any matches.- Angegeben von:
matchesAnyin SchnittstelleObjectIterable<T>- Parameter:
filter- that should be applied- Gibt zurück:
- true if any matches were found
-
matchesNone
Beschreibung aus Schnittstelle kopiert:ObjectIterableHelper function to reduce stream usage that allows to filter for no matches.- Angegeben von:
matchesNonein SchnittstelleObjectIterable<T>- Parameter:
filter- that should be applied- Gibt zurück:
- true if no matches were found
-
matchesAll
Beschreibung aus Schnittstelle kopiert:ObjectIterableHelper function to reduce stream usage that allows to filter for all matches.- Angegeben von:
matchesAllin SchnittstelleObjectIterable<T>- Parameter:
filter- that should be applied- Gibt zurück:
- true if all matches.
-
reduce
Beschreibung aus Schnittstelle kopiert:ObjectIterablePerforms a reduction on the elements of this Iterable- Angegeben von:
reducein SchnittstelleObjectIterable<T>- Typparameter:
E- the keyType of elements maintained by this Collection- Parameter:
identity- the start valueoperator- the operation that should be applied- Gibt zurück:
- the reduction result, returns identity if nothing was found
-
reduce
Beschreibung aus Schnittstelle kopiert:ObjectIterablePerforms a reduction on the elements of this Iterable- Angegeben von:
reducein SchnittstelleObjectIterable<T>- Parameter:
operator- the operation that should be applied- Gibt zurück:
- the reduction result, returns null value if nothing was found
-
findFirst
Beschreibung aus Schnittstelle kopiert:ObjectIterableHelper function to reduce stream usage that allows to filter for the first match.- Angegeben von:
findFirstin SchnittstelleObjectIterable<T>- Parameter:
filter- that should be applied- Gibt zurück:
- the found value or the null equivalent variant.
-
count
Beschreibung aus Schnittstelle kopiert:ObjectIterableHelper function to reduce stream usage that allows to count the valid elements.- Angegeben von:
countin SchnittstelleObjectIterable<T>- Parameter:
filter- that should be applied- Gibt zurück:
- the amount of Valid Elements
-