T - the keyType of elements maintained by this Collectionpublic interface ObjectList<T> extends ObjectCollection<T>, java.util.List<T>
ISizeProvider.CollectionSize| Modifier and Type | Method and Description |
|---|---|
boolean |
addAll(int index,
ObjectCollection<T> c)
A Type-Specific addAll Function to reduce (un)boxing
|
boolean |
addAll(int index,
ObjectList<T> c)
A Type-Specific and optimized addAll function that allows a faster transfer of elements
|
boolean |
addAll(ObjectList<T> c)
A Type-Specific and optimized addAll function that allows a faster transfer of elements
|
default void |
addElements(int from,
T... a)
A function to fast add elements to the list
|
void |
addElements(int from,
T[] a,
int offset,
int length)
A function to fast add elements to the list
|
default void |
addElements(T... a)
A function to fast add elements to the list
|
default boolean |
addIfAbsent(T e)
A Helper function that will only add elements if it is not present.
|
default boolean |
addIfPresent(T e)
A Helper function that will only add elements if it is present.
|
ObjectList<T> |
copy()
A Function that does a shallow clone of the Collection itself.
|
<K> K[] |
extractElements(int from,
int to,
java.lang.Class<K> type)
A function to fast extract elements out of the list, this removes the elements that were fetched.
|
default void |
forEachIndexed(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 list
|
T[] |
getElements(int from,
T[] a,
int offset,
int length)
A function to fast fetch elements from the list
|
ObjectListIterator<T> |
listIterator()
A Type-Specific Iterator of listIterator
|
ObjectListIterator<T> |
listIterator(int index)
A Type-Specific Iterator of listIterator
|
void |
removeElements(int from,
int to)
a function to fast remove elements from the list.
|
default void |
replaceAll(java.util.function.UnaryOperator<T> o)
A function to replace all values in the list
|
void |
size(int size)
A function to ensure the elements are within the requested size.
|
default void |
sort(java.util.Comparator<? super T> c)
Sorts the elements specified by the Natural order either by using the Comparator or the elements
|
default ObjectSplititerator<T> |
spliterator()
A Type Specific Type Splititerator to reduce boxing/unboxing
|
ObjectList<T> |
subList(int from,
int to)
A Type-Specific List of subList
|
T |
swapRemove(int index)
A Highly Optimized remove function that removes the desired element.
|
boolean |
swapRemove(T e)
A Highly Optimized remove function that removes the desired element.
|
default ObjectList<T> |
synchronize()
Creates a Wrapped List that is Synchronized
|
default ObjectList<T> |
synchronize(java.lang.Object mutex)
Creates a Wrapped List that is Synchronized
|
default ObjectList<T> |
unmodifiable()
Creates a Wrapped List that is unmodifiable
|
default void |
unstableSort(java.util.Comparator<? super T> c)
Sorts the elements specified by the Natural order either by using the Comparator or the elements using a unstable sort
|
addAll, addAll, addAll, addAll, containsAll, containsAny, containsAny, iterator, pour, removeAll, removeAll, retainAll, retainAll, toArrayarrayflatMap, asAsync, count, distinct, filter, findFirst, flatMap, forEach, limit, map, matchesAll, matchesAny, matchesNone, peek, pourAsList, pourAsSet, reduce, reduce, repeat, sortedof, sizedefault boolean addIfAbsent(T e)
e - the element to adddefault boolean addIfPresent(T e)
e - the element to addboolean addAll(int index,
ObjectCollection<T> c)
c - the elements that need to be addedindex - index at which the specified elements is to be insertedList.addAll(int, java.util.Collection)boolean addAll(ObjectList<T> c)
c - the elements that need to be addedboolean addAll(int index,
ObjectList<T> c)
c - the elements that need to be addedindex - index at which the specified elements is to be inserteddefault void replaceAll(java.util.function.UnaryOperator<T> o)
replaceAll in interface java.util.List<T>o - the action to replace the valuesjava.lang.NullPointerException - if o is nulldefault void addElements(T... a)
a - the elements that should be addedjava.lang.IndexOutOfBoundsException - if from is outside of the lists rangedefault void addElements(int from,
T... a)
from - the index where the elements should be added into the lista - the elements that should be addedjava.lang.IndexOutOfBoundsException - if from is outside of the lists rangevoid addElements(int from,
T[] a,
int offset,
int length)
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 fromjava.lang.IndexOutOfBoundsException - if from is outside of the lists rangedefault T[] getElements(int from, T[] a)
from - index where the list should be fetching elements froma - the array where the values should be inserted tojava.lang.NullPointerException - if the array is nulljava.lang.IndexOutOfBoundsException - if from is outside of the lists rangejava.lang.IllegalStateException - if offset or length are smaller then 0 or exceed the array lengthT[] getElements(int from, T[] a, int offset, int length)
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 fromjava.lang.NullPointerException - if the array is nulljava.lang.IndexOutOfBoundsException - if from is outside of the lists rangejava.lang.IllegalStateException - if offset or length are smaller then 0 or exceed the array lengthvoid removeElements(int from,
int to)
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)T swapRemove(int index)
index - the index of the element to be removedboolean swapRemove(T e)
e - the element that should be removed<K> K[] extractElements(int from,
int to,
java.lang.Class<K> type)
K - the keyType of elements maintained by this Collectionfrom - 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 OutputArraydefault void sort(java.util.Comparator<? super T> c)
sort in interface java.util.List<T>List.sort(Comparator)default void unstableSort(java.util.Comparator<? super T> c)
c - the sorter of the elements, can be nullList.sort(Comparator)default void forEachIndexed(IntObjectConsumer<T> action)
forEachIndexed in interface ObjectIterable<T>action - The action to be performed for each elementjava.lang.NullPointerException - if the specified action is nullObjectListIterator<T> listIterator()
listIterator in interface java.util.List<T>List.listIterator()ObjectListIterator<T> listIterator(int index)
listIterator in interface java.util.List<T>List.listIterator(int)ObjectList<T> subList(int from, int to)
subList in interface java.util.List<T>List.subList(int, int)default ObjectList<T> synchronize()
synchronize in interface ObjectCollection<T>ObjectLists.synchronize(speiger.src.collections.objects.lists.ObjectList<T>)default ObjectList<T> synchronize(java.lang.Object mutex)
synchronize in interface ObjectCollection<T>mutex - is the controller of the synchronization blockObjectLists.synchronize(speiger.src.collections.objects.lists.ObjectList<T>)default ObjectList<T> unmodifiable()
unmodifiable in interface ObjectCollection<T>ObjectLists.unmodifiable(speiger.src.collections.objects.lists.ObjectList<T>)void size(int size)
size - the requested amount of elements/room for elementsObjectList<T> copy()
ObjectCollectioncopy in interface ObjectCollection<T>default ObjectSplititerator<T> spliterator()
spliterator in interface java.util.Collection<T>spliterator in interface java.lang.Iterable<T>spliterator in interface java.util.List<T>spliterator in interface ObjectCollection<T>spliterator in interface ObjectIterable<T>