Modul speiger.src.collections
Schnittstelle ObjectList<T>
- Typparameter:
T- the keyType of elements maintained by this Collection
- Alle Superschnittstellen:
Collection<T>,ISizeProvider,Iterable<T>,List<T>,ObjectCollection<T>,ObjectIterable<T>
- Alle bekannten Implementierungsklassen:
AbstractObjectList,CopyOnWriteObjectArrayList,ImmutableObjectList,ObjectArrayList,ObjectLinkedList
A Type Specific List interface that reduces boxing/unboxing and adds a couple extra quality of life features
-
Verschachtelte Klassen - Übersicht
Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen speiger.src.collections.utils.ISizeProvider
ISizeProvider.CollectionSize -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungbooleanaddAll(int index, ObjectCollection<T> c) A Type-Specific addAll Function to reduce (un)boxingbooleanaddAll(int index, ObjectList<T> c) A Type-Specific and optimized addAll function that allows a faster transfer of elementsbooleanaddAll(ObjectList<T> c) A Type-Specific and optimized addAll function that allows a faster transfer of elementsdefault voidaddElements(int from, T... a) A function to fast add elements to the listvoidaddElements(int from, T[] a, int offset, int length) A function to fast add elements to the listdefault voidaddElements(T... a) A function to fast add elements to the listdefault booleanaddIfAbsent(T e) A Helper function that will only add elements if it is not present.default booleanaddIfPresent(T e) A Helper function that will only add elements if it is present.copy()A Function that does a shallow clone of the Collection itself.<K> K[]extractElements(int from, int to, Class<K> type) A function to fast extract elements out of the list, this removes the elements that were fetched.default voidforEachIndexed(IntObjectConsumer<T> action) A Indexed forEach implementation that allows you to keep track of how many elements were already iterated over.default T[]getElements(int from, T[] a) A function to fast fetch elements from the listT[]getElements(int from, T[] a, int offset, int length) A function to fast fetch elements from the listdefault TgetFirst()Helper method that returns the first element of a List.default TgetLast()Helper method that returns the last element of a List.indexedIterator(int... indecies) Creates a Iterator that follows the indecies provided.
For example if the Lists Contents is:
-1, 0 1
and the indecies are:
0, 1, 2, 2, 1, 0
then the iterator will return the following values:
-1, 0, 1, 1, 0, -1indexedIterator(IntList indecies) Creates a Iterator that follows the indecies provided.
For example if the Lists Contents is:
-1, 0 1
and the indecies are:
0, 1, 2, 2, 1, 0
then the iterator will return the following values:
-1, 0, 1, 1, 0, -1A Type-Specific Iterator of listIteratorlistIterator(int index) A Type-Specific Iterator of listIteratorvoidremoveElements(int from, int to) a function to fast remove elements from the list.default THelper method that removes and returns the first element of a List.default THelper method that removes and returns the last element of a List.default voidreplaceAll(UnaryOperator<T> o) A function to replace all values in the listreversed()A Type-Specific List Helper that shows all elements in reverse.voidsize(int size) A function to ensure the elements are within the requested size.default voidsort(Comparator<? super T> c) Sorts the elements specified by the Natural order either by using the Comparator or the elementsdefault ObjectSplititerator<T>A Type Specific Type Splititerator to reduce boxing/unboxingsubList(int from, int to) A Type-Specific List of subListswapRemove(int index) A Highly Optimized remove function that removes the desired element.booleanswapRemove(T e) A Highly Optimized remove function that removes the desired element.default ObjectList<T>Creates a Wrapped List that is Synchronizeddefault ObjectList<T>synchronize(Object mutex) Creates a Wrapped List that is Synchronizeddefault ObjectList<T>Creates a Wrapped List that is unmodifiabledefault voidunstableSort(Comparator<? super T> c) Sorts the elements specified by the Natural order either by using the Comparator or the elements using a unstable sortVon Schnittstelle geerbte Methoden java.util.Collection
parallelStream, removeIf, streamVon Schnittstelle geerbte Methoden speiger.src.collections.utils.ISizeProvider
sizeVon Schnittstelle geerbte Methoden java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, remove, remove, removeAll, retainAll, set, size, toArray, toArrayVon Schnittstelle geerbte Methoden speiger.src.collections.objects.collections.ObjectCollection
addAll, addAll, addAll, addAll, containsAll, containsAny, containsAny, iterator, pour, removeAll, removeAll, retainAll, retainAll, toArrayVon Schnittstelle geerbte Methoden speiger.src.collections.objects.collections.ObjectIterable
arrayflatMap, asAsync, count, distinct, filter, findFirst, flatMap, forEach, limit, map, mapToBoolean, mapToByte, mapToDouble, mapToFloat, mapToInt, mapToLong, mapToShort, matchesAll, matchesAny, matchesNone, peek, pourAsList, pourAsSet, reduce, reduce, repeat, sorted
-
Methodendetails
-
addIfAbsent
A Helper function that will only add elements if it is not present.- Parameter:
e- the element to add- Gibt zurück:
- true if the list was modified
-
addIfPresent
A Helper function that will only add elements if it is present.- Parameter:
e- the element to add- Gibt zurück:
- true if the list was modified
-
addAll
A Type-Specific addAll Function to reduce (un)boxing- Parameter:
index- index at which the specified elements is to be insertedc- the elements that need to be added- Gibt zurück:
- true if the list was modified
- Siehe auch:
-
addAll
A Type-Specific and optimized addAll function that allows a faster transfer of elements- Parameter:
c- the elements that need to be added- Gibt zurück:
- true if the list was modified
-
addAll
A Type-Specific and optimized addAll function that allows a faster transfer of elements- Parameter:
index- index at which the specified elements is to be insertedc- the elements that need to be added- Gibt zurück:
- true if the list was modified
-
getFirst
Helper method that returns the first element of a List. This function was introduced due to how annoying it is to get/remove the last element of a list. This simplifies this process a bit.- Gibt zurück:
- first element of the list
-
getLast
Helper method that returns the last element of a List. This function was introduced due to how annoying it is to get/remove the last element of a list. This simplifies this process a bit.- Gibt zurück:
- last element of the list
-
removeFirst
Helper method that removes and returns the first element of a List. This function was introduced due to how annoying it is to get/remove the last element of a list. This simplifies this process a bit.- Gibt zurück:
- first element of the list and removes it
-
removeLast
Helper method that removes and returns the last element of a List. This function was introduced due to how annoying it is to get/remove the last element of a list. This simplifies this process a bit.- Gibt zurück:
- last element of the list and removes it
-
replaceAll
A function to replace all values in the list- Angegeben von:
replaceAllin SchnittstelleList<T>- Parameter:
o- the action to replace the values- Löst aus:
NullPointerException- if o is null
-
addElements
A function to fast add elements to the list- Parameter:
a- the elements that should be added- Löst aus:
IndexOutOfBoundsException- if from is outside of the lists range
-
addElements
A function to fast add elements to the list- Parameter:
from- the index where the elements should be added into the lista- the elements that should be added- Löst aus:
IndexOutOfBoundsException- if from is outside of the lists range
-
addElements
A function to fast add elements to the list- Parameter:
from- the index where the elements should be added into the lista- the elements that should be addedoffset- the start index of the array should be read fromlength- how many elements should be read from- Löst aus:
IndexOutOfBoundsException- if from is outside of the lists range
-
getElements
A function to fast fetch elements from the list- Parameter:
from- index where the list should be fetching elements froma- the array where the values should be inserted to- Gibt zurück:
- the inputArray
- Löst aus:
NullPointerException- if the array is nullIndexOutOfBoundsException- if from is outside of the lists rangeIllegalStateException- if offset or length are smaller then 0 or exceed the array length
-
getElements
A function to fast fetch elements from the list- Parameter:
from- index where the list should be fetching elements froma- the array where the values should be inserted tooffset- the startIndex of where the array should be written tolength- the number of elements the values should be fetched from- Gibt zurück:
- the inputArray
- Löst aus:
NullPointerException- if the array is nullIndexOutOfBoundsException- if from is outside of the lists rangeIllegalStateException- if offset or length are smaller then 0 or exceed the array length
-
removeElements
void removeElements(int from, int to) a function to fast remove elements from the list.- Parameter:
from- the start index of where the elements should be removed from (inclusive)to- the end index of where the elements should be removed to (exclusive)
-
swapRemove
A Highly Optimized remove function that removes the desired element. But instead of shifting the elements to the left it moves the last element to the removed space.- Parameter:
index- the index of the element to be removed- Gibt zurück:
- the element previously at the specified position
-
swapRemove
A Highly Optimized remove function that removes the desired element. But instead of shifting the elements to the left it moves the last element to the removed space.- Parameter:
e- the element that should be removed- Gibt zurück:
- true if the element was removed
-
extractElements
A function to fast extract elements out of the list, this removes the elements that were fetched.- Typparameter:
K- the keyType of elements maintained by this Collection- Parameter:
from- the start index of where the elements should be fetched from (inclusive)to- the end index of where the elements should be fetched to (exclusive)type- the type of the OutputArray- Gibt zurück:
- a array of the elements that were fetched
-
sort
Sorts the elements specified by the Natural order either by using the Comparator or the elements -
unstableSort
Sorts the elements specified by the Natural order either by using the Comparator or the elements using a unstable sort- Parameter:
c- the sorter of the elements, can be null- Siehe auch:
-
forEachIndexed
A 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- Löst aus:
NullPointerException- if the specified action is null
-
listIterator
ObjectListIterator<T> listIterator()A Type-Specific Iterator of listIterator- Angegeben von:
listIteratorin SchnittstelleList<T>- Siehe auch:
-
listIterator
A Type-Specific Iterator of listIterator- Angegeben von:
listIteratorin SchnittstelleList<T>- Siehe auch:
-
indexedIterator
Creates a Iterator that follows the indecies provided.
For example if the Lists Contents is:
-1, 0 1
and the indecies are:
0, 1, 2, 2, 1, 0
then the iterator will return the following values:
-1, 0, 1, 1, 0, -1- Parameter:
indecies- that should be used for the iteration.- Gibt zurück:
- a custom indexed iterator
-
indexedIterator
Creates a Iterator that follows the indecies provided.
For example if the Lists Contents is:
-1, 0 1
and the indecies are:
0, 1, 2, 2, 1, 0
then the iterator will return the following values:
-1, 0, 1, 1, 0, -1- Parameter:
indecies- that should be used for the iteration.- Gibt zurück:
- a custom indexed iterator
-
subList
A Type-Specific List of subList -
reversed
ObjectList<T> reversed()A Type-Specific List Helper that shows all elements in reverse.- Gibt zurück:
- a list wrapper that has all elements reversed!
-
synchronize
Creates a Wrapped List that is Synchronized- Angegeben von:
synchronizein SchnittstelleObjectCollection<T>- Gibt zurück:
- a new List that is synchronized
- Siehe auch:
-
synchronize
Creates a Wrapped List that is Synchronized- Angegeben von:
synchronizein SchnittstelleObjectCollection<T>- Parameter:
mutex- is the controller of the synchronization block- Gibt zurück:
- a new List Wrapper that is synchronized
- Siehe auch:
-
unmodifiable
Creates a Wrapped List that is unmodifiable- Angegeben von:
unmodifiablein SchnittstelleObjectCollection<T>- Gibt zurück:
- a new List Wrapper that is unmodifiable
- Siehe auch:
-
size
void size(int size) A function to ensure the elements are within the requested size. If smaller then the stored elements they get removed as needed. If bigger it is ensured that enough room is provided depending on the implementation- Parameter:
size- the requested amount of elements/room for elements
-
copy
ObjectList<T> 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
-
spliterator
A Type Specific Type Splititerator to reduce boxing/unboxing- Angegeben von:
spliteratorin SchnittstelleCollection<T>- Angegeben von:
spliteratorin SchnittstelleIterable<T>- Angegeben von:
spliteratorin SchnittstelleList<T>- Angegeben von:
spliteratorin SchnittstelleObjectCollection<T>- Angegeben von:
spliteratorin SchnittstelleObjectIterable<T>- Gibt zurück:
- type specific splititerator
-