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>
,Clearable
,EmptinessRequestable
,MaterializationRequestable
,Copyable<IArrayList<E>>
,Iterable<E>
- Version:
- 2024-01-30
- Autor:
- Silvan Wyss
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoid
The time complexity of this implementation is O(n) when the currentArrayList
contains n elements.void
The time complexity of this implementation is O(n+m) when the currentArrayList
contains n elements and m elements are given.void
The time complexity of this implementation is O(n+m) when the currentArrayList
contains n elements and m elements are given.void
The time complexity of this implementation is O(n+m) when the currentArrayList
contains n elements and m elements are given.void
clear()
The time complexity of this implementation is O(1).The time complexity of this implementation is O(n) when the currentArrayList
contains n elements.static <E2> ArrayList
<E2> int
getCount()
The time complexity of this implementation is O(1).getStoredAtOneBasedIndex
(int oneBasedIndex) The time complexity of this implementation is O(1).boolean
The 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 currentArrayList
contains n elements.static <E2> ArrayList
<E2> withElement
(E2 element, E2... elements) static <E2> ArrayList
<E2> withElements
(E2[] elements) The time complexity of this implementation is O(n) when n elements are given.static <E2> ArrayList
<E2> withInitialCapacity
(int initialCapacity) The time complexity of this implementation is O(1).static <E2> ArrayList
<E2> withInitialCapacityFromSizeOfContainer
(CountRequestable<?> container) The time complexity of this implementation is O(1).Von Klasse geerbte Methoden ch.nolix.core.container.arraylist.AbstractExtendedContainer
createEmptyMutableList, getViewFromOneBasedStartIndexToOneBasedEndIndex, getViewOf, getViewOfStoredSelected, toOrderedList
Von Klasse geerbte Methoden ch.nolix.core.container.base.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, toWithOneBasedIndex
Von Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Von Schnittstelle geerbte Methoden ch.nolix.coreapi.containerapi.commoncontainerapi.AggregationRequestable
getAverage, getAverageOrZero, getMax, getMaxOrZero, getMedian, getMedianOrZero, getMin, getMinOrZero, getStandardDeviation, getSum, getSumOfInts, getVariance
Von Schnittstelle geerbte Methoden ch.nolix.coreapi.containerapi.commoncontainerapi.ArrayMappable
toArray, toByteArray, toCharArray, toDoubleArray, toIntArray, toLongArray, toStringArray
Von Schnittstelle geerbte Methoden ch.nolix.coreapi.containerapi.commoncontainerapi.CountRequestable
getCount, getCountOf
Von Schnittstelle geerbte Methoden ch.nolix.coreapi.stateapi.staterequestapi.EmptinessRequestable
containsAny, isEmpty
Von Schnittstelle geerbte Methoden ch.nolix.coreapi.containerapi.baseapi.Filterable
getStoredOfType, getStoredOthers, getStoredSelected
Von Schnittstelle geerbte Methoden ch.nolix.coreapi.containerapi.baseapi.Groupable
getStoredInGroups
Von Schnittstelle geerbte Methoden ch.nolix.coreapi.containerapi.baseapi.IContainer
toOrderedList, toReversedList
Von Schnittstelle geerbte Methoden ch.nolix.coreapi.containerapi.baseapi.IFilteringContainerViewProvider
getViewOfStoredSelected
Von Schnittstelle geerbte Methoden ch.nolix.coreapi.containerapi.baseapi.IIntervallContainerViewProvider
getViewFromOneBasedStartIndex, getViewFromOneBasedStartIndexToOneBasedEndIndex, getViewToOneBasedEndIndex, getViewWithoutFirst, getViewWithoutFirst, getViewWithoutLast, getViewWithoutLast
Von Schnittstelle geerbte Methoden ch.nolix.coreapi.containerapi.baseapi.IMappingContainerViewProvider
getViewOf
Von Schnittstelle geerbte Methoden ch.nolix.coreapi.containerapi.commoncontainerapi.IndexRequestable
getOneBasedIndexOfFirst, getOneBasedIndexOfFirstEqualElement, getOneBasedIndexOfFirstOccurrenceOf
Von Schnittstelle geerbte Methoden java.lang.Iterable
forEach, spliterator
Von Schnittstelle geerbte Methoden ch.nolix.coreapi.containerapi.baseapi.Mappable
to, toMultiples, toNumbers, toStrings, toWithOneBasedIndex
Von Schnittstelle geerbte Methoden ch.nolix.coreapi.stateapi.staterequestapi.MaterializationRequestable
isView
Von Schnittstelle geerbte Methoden ch.nolix.coreapi.containerapi.commoncontainerapi.SingleSearchable
getOptionalStoredFirst, getOptionalStoredFirst, getStoredByMax, getStoredByMin, getStoredFirst, getStoredFirst, getStoredFirstOfType, getStoredLast, getStoredOne, getStoredOne
Von Schnittstelle geerbte Methoden ch.nolix.coreapi.containerapi.commoncontainerapi.StoringRequestable
contains, containsAll, containsAll, containsAll, containsAny, containsAny, containsAnyOf, containsAnyOf, containsAsManyAs, containsEqualing, containsExactlyEqualingInSameOrder, containsExactlyInSameOrder, containsLessThan, containsMoreThan, containsNone, containsNone, containsNoneOf, containsOnce, containsOne, containsOne, containsOneEqualing, containsOnly
Von Schnittstelle geerbte Methoden ch.nolix.coreapi.containerapi.commoncontainerapi.StringMappable
toConcatenatedString, toStringWithSeparator, toStringWithSeparator
-
Methodendetails
-
createEmpty
-
withElement
- Typparameter:
E2
- is the type of the given element and the given elements.- Parameter:
element
-elements
-- Gibt zurück:
- a new
ArrayList
with the given element and elements. - Löst aus:
ArgumentIsNullException
- if the given element is null.ArgumentIsNullException
- if the given elements is null.ArgumentIsNullException
- if one of the given elements is null.
-
withElements
The time complexity of this implementation is O(n) when n elements are given.- Typparameter:
E2
- is the type of the given elements.- Parameter:
elements
-- Gibt zurück:
- a new
ArrayList
with 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:
E2
- is the type of the elements of the createdArrayList
.- Parameter:
initialCapacity
-- Gibt zurück:
- a new
ArrayList
with the given initialCapacity - Löst aus:
NegativeArgumentException
- if the given initialCapacity is negative.
-
withInitialCapacityFromSizeOfContainer
public static <E2> ArrayList<E2> withInitialCapacityFromSizeOfContainer(CountRequestable<?> container) The time complexity of this implementation is O(1).- Typparameter:
E2
- is the type of the elements of the createdArrayList
.- Parameter:
container
-- Gibt zurück:
- a new
ArrayList
with 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 currentArrayList
contains n elements. Adds the given element at the end of the currentIArrayList
.- Angegeben von:
addAtEnd
in SchnittstelleIArrayList<E>
- Parameter:
element
-
-
addAtEnd
The time complexity of this implementation is O(n+m) when the currentArrayList
contains n elements and m elements are given. Adds the given given elements at the end of the currentIArrayList
. The elements will be added in the given order.- Angegeben von:
addAtEnd
in SchnittstelleIArrayList<E>
- Parameter:
element
-elements
-
-
addAtEnd
The time complexity of this implementation is O(n+m) when the currentArrayList
contains 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:
addAtEnd
in SchnittstelleIArrayList<E>
- Parameter:
elements
-
-
addAtEnd
The time complexity of this implementation is O(n+m) when the currentArrayList
contains 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:
addAtEnd
in SchnittstelleIArrayList<E>
- Parameter:
elements
-
-
clear
public void clear()The time complexity of this implementation is O(1). Removes the elements of the currentClearable
. -
createCopy
The time complexity of this implementation is O(n) when the currentArrayList
contains n elements.- Angegeben von:
createCopy
in SchnittstelleCopyable<E>
- Gibt zurück:
- a new copy of the current
Copyable
.
-
getCount
public int getCount()The time complexity of this implementation is O(1).- Angegeben von:
getCount
in 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:
getStoredAtOneBasedIndex
in SchnittstelleSingleSearchable<E>
- Parameter:
oneBasedIndex
-- Gibt zurück:
- the element at the given oneBasedIndex. The element can be null.
-
isMaterialized
public boolean isMaterialized()The time complexity of this implementation is O(1).- Angegeben von:
isMaterialized
in SchnittstelleMaterializationRequestable
- Gibt zurück:
- true if the current
MaterializationRequestable
is materialized, false otherwise.
-
iterator
The time complexity of this implementation is O(1). -
toString
The time complexity of this implementation is O(n) if the currentArrayList
contains n elements.
-