Klasse ArrayList<E>
java.lang.Object
ch.nolix.core.container.base.AbstractContainer<E>
ch.nolix.core.container.arraylist.AbstractExtendedContainer<E>
ch.nolix.core.container.arraylist.ArrayList<E>
- Typparameter:
E- is the type of the elements of aArrayList.
- Alle implementierten Schnittstellen:
Filterable<E>, Groupable<E>, IContainer<E>, IFilteringContainerViewProvider<E>, IIntervallContainerViewProvider<E>, IMappingContainerViewProvider<E>, Mappable<E>, AggregationRequestable<E>, ArrayMappable<E>, CountRequestable<E>, IndexRequestable<E>, IterableWithCopyableIterator<E>, SingleSearchable<E>, StoringRequestable<E>, StringMappable, IArrayList<E>, Copyable<IArrayList<E>>, Clearable, EmptinessRequestable, MaterializationRequestable, Iterable<E>
- Autor:
- Silvan Wyss
-
Methodenübersicht
Modifikator und TypMethodeBeschreibungvoidThe time complexity of this implementation is O(n) when the currentArrayListcontains n elements.voidThe time complexity of this implementation is O(n+m) when the currentArrayListcontains n elements and m elements are given.<T extends E>
voidaddAtEnd(T... elements) The time complexity of this implementation is O(n+m) when the currentArrayListcontains n elements and m elements are given.voidclear()The time complexity of this implementation is O(1).static <T> ArrayList<T> getCopy()The time complexity of this implementation is O(n) when the currentArrayListcontains n elements.intgetCount()The time complexity of this implementation is O(1).getStoredAtOneBasedIndex(int oneBasedIndex) The time complexity of this implementation is O(1).voidinsertAtOneBasedIndex(int oneBasedIndex, E element) booleanThe time complexity of this implementation is O(1).iterator()The time complexity of this implementation is O(1).toString()The time complexity of this implementation is O(n) if the currentArrayListcontains n elements.static <T> ArrayList<T> withElements(T... elements) The time complexity of this implementation is O(n) when n elements are given.static <T> ArrayList<T> withInitialCapacity(int initialCapacity) The time complexity of this implementation is O(1).static <T> ArrayList<T> withInitialCapacityFromSizeOfContainer(CountRequestable<?> container) The time complexity of this implementation is O(1).Von Klasse geerbte Methoden AbstractExtendedContainer
createEmptyMutableList, getViewFromOneBasedStartIndexToOneBasedEndIndex, getViewOf, getViewOfStoredSelected, toOrderedListVon Klasse geerbte Methoden AbstractContainer
contains, containsAll, containsAll, containsAll, containsAny, containsAny, containsAnyOf, containsAnyOf, containsAsManyAs, containsEqualing, containsExactlyEqualingInSameOrder, containsExactlyInSameOrder, containsLessThan, containsMoreThan, containsNone, containsNone, containsNoneOf, containsOnce, containsOne, containsOne, containsOneEqualing, containsOnly, getAverage, getAverageOrZero, getCount, getCountOf, getMax, getMaxOrZero, getMedian, getMedianOrZero, getMin, getMinOrZero, getOneBasedIndexOfFirst, getOneBasedIndexOfFirstEqualElement, getOneBasedIndexOfFirstOccurrenceOf, getOptionalStoredFirst, getOptionalStoredFirst, getStandardDeviation, getStoredByMax, getStoredByMin, getStoredFirst, getStoredFirst, getStoredFirstOfType, getStoredInGroups, getStoredLast, getStoredOfType, getStoredOne, getStoredOne, getStoredOthers, getStoredSelected, getSum, getSumOfInts, getVariance, getViewFromOneBasedStartIndex, getViewToOneBasedEndIndex, getViewWithoutFirst, getViewWithoutFirst, getViewWithoutLast, getViewWithoutLast, isEmpty, to, toArray, toByteArray, toCharArray, toConcatenatedString, toDoubleArray, toIntArray, toLongArray, toMultiples, toNumbers, toReversedList, toStringArray, toStrings, toStringWithSeparator, toStringWithSeparator, toWithOneBasedIndexVon Klasse geerbte Methoden Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitVon Schnittstelle geerbte Methoden AggregationRequestable
getAverage, getAverageOrZero, getMax, getMaxOrZero, getMedian, getMedianOrZero, getMin, getMinOrZero, getStandardDeviation, getSum, getSumOfInts, getVarianceVon Schnittstelle geerbte Methoden ArrayMappable
toArray, toByteArray, toCharArray, toDoubleArray, toIntArray, toLongArray, toStringArrayVon Schnittstelle geerbte Methoden CountRequestable
getCount, getCountOfVon Schnittstelle geerbte Methoden EmptinessRequestable
containsAny, isEmptyVon Schnittstelle geerbte Methoden Filterable
getStoredOfType, getStoredOthers, getStoredSelectedVon Schnittstelle geerbte Methoden Groupable
getStoredInGroupsVon Schnittstelle geerbte Methoden IContainer
toOrderedList, toReversedListVon Schnittstelle geerbte Methoden IFilteringContainerViewProvider
getViewOfStoredSelectedVon Schnittstelle geerbte Methoden IIntervallContainerViewProvider
getViewFromOneBasedStartIndex, getViewFromOneBasedStartIndexToOneBasedEndIndex, getViewToOneBasedEndIndex, getViewWithoutFirst, getViewWithoutFirst, getViewWithoutLast, getViewWithoutLastVon Schnittstelle geerbte Methoden IMappingContainerViewProvider
getViewOfVon Schnittstelle geerbte Methoden IndexRequestable
getOneBasedIndexOfFirst, getOneBasedIndexOfFirstEqualElement, getOneBasedIndexOfFirstOccurrenceOfVon Schnittstelle geerbte Methoden Iterable
forEach, spliteratorVon Schnittstelle geerbte Methoden Mappable
to, toMultiples, toNumbers, toStrings, toWithOneBasedIndexVon Schnittstelle geerbte Methoden MaterializationRequestable
isViewVon Schnittstelle geerbte Methoden SingleSearchable
getOptionalStoredFirst, getOptionalStoredFirst, getStoredByMax, getStoredByMin, getStoredFirst, getStoredFirst, getStoredFirstOfType, getStoredLast, getStoredOne, getStoredOneVon Schnittstelle geerbte Methoden StoringRequestable
contains, containsAll, containsAll, containsAll, containsAny, containsAny, containsAnyOf, containsAnyOf, containsAsManyAs, containsEqualing, containsExactlyEqualingInSameOrder, containsExactlyInSameOrder, containsLessThan, containsMoreThan, containsNone, containsNone, containsNoneOf, containsOnce, containsOne, containsOne, containsOneEqualing, containsOnlyVon Schnittstelle geerbte Methoden StringMappable
toConcatenatedString, toStringWithSeparator, toStringWithSeparator
-
Methodendetails
-
createEmpty
-
withElements
The time complexity of this implementation is O(n) when n elements are given.- Typparameter:
T- is the type of the given elements.- Parameter:
elements-- Gibt zurück:
- a new
ArrayListwith the given elements. - Löst aus:
ArgumentIsNullException- if the given elements is null.ArgumentIsNullException- if one of the given elements is null.
-
withInitialCapacity
The time complexity of this implementation is O(1).- Typparameter:
T- is the type of the elements of the createdArrayList.- Parameter:
initialCapacity-- Gibt zurück:
- a new
ArrayListwith the given initialCapacity - Löst aus:
NegativeArgumentException- if the given initialCapacity is negative.
-
withInitialCapacityFromSizeOfContainer
public static <T> ArrayList<T> withInitialCapacityFromSizeOfContainer(CountRequestable<?> container) The time complexity of this implementation is O(1).- Typparameter:
T- is the type of the elements of the createdArrayList.- Parameter:
container-- Gibt zurück:
- a new
ArrayListwith a initialCapacity that is the size of the given container. - Löst aus:
NullPointerException- if the given container is null.
-
addAtEnd
The time complexity of this implementation is O(n) when the currentArrayListcontains n elements. Adds the given element at the end of the currentIArrayList.- Angegeben von:
addAtEndin SchnittstelleIArrayList<E>- Parameter:
element-
-
addAtEnd
The time complexity of this implementation is O(n+m) when the currentArrayListcontains n elements and m elements are given. Adds the given elements at the end of the currentIArrayList. The elements will be added in the given order.- Angegeben von:
addAtEndin SchnittstelleIArrayList<E>- Typparameter:
T- is the type of the given elements.- Parameter:
elements-
-
addAtEnd
The time complexity of this implementation is O(n+m) when the currentArrayListcontains n elements and m elements are given. Adds the given elements at the end of the currentIArrayList. The elements will be added in the given order.- Angegeben von:
addAtEndin SchnittstelleIArrayList<E>- Parameter:
elements-
-
clear
-
getCopy
-
getCount
public int getCount()The time complexity of this implementation is O(1).- Angegeben von:
getCountin SchnittstelleCountRequestable<E>- Gibt zurück:
- the number of elements of the current
CountRequestable.
-
getStoredAtOneBasedIndex
The time complexity of this implementation is O(1).- Angegeben von:
getStoredAtOneBasedIndexin SchnittstelleSingleSearchable<E>- Parameter:
oneBasedIndex-- Gibt zurück:
- the element at the given oneBasedIndex. The element can be null.
-
insertAtOneBasedIndex
The time complexity of this implementation is O(n) if the given oneBasedIndex is bigger than the number of the elements of the currentArrayListand the currentArrayListcontains n elements. The time complexity of this implementation is O(1) if the given oneBasedIndex is not bigger than the number of the elements of the currentArrayList. Adds the given element at the given oneBasedIndex- Angegeben von:
insertAtOneBasedIndexin SchnittstelleIArrayList<E>- Parameter:
oneBasedIndex-element-
-
isMaterialized
public boolean isMaterialized()The time complexity of this implementation is O(1).- Angegeben von:
isMaterializedin SchnittstelleMaterializationRequestable- Gibt zurück:
- true if the current
MaterializationRequestableis materialized, false otherwise.
-
iterator
The time complexity of this implementation is O(1). -
toString
-