Klasse LinkedList<E>
java.lang.Object
ch.nolix.core.container.base.AbstractContainer<E>
ch.nolix.core.container.arraylist.AbstractExtendedContainer<E>
ch.nolix.core.container.linkedlist.LinkedList<E>
- Typparameter:
E- is the type of the elements of aLinkedList.
- 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,ILinkedList<E>,Copyable<ILinkedList<E>>,Clearable,EmptinessRequestable,MaterializationRequestable,Iterable<E>
A
LinkedList is a AbstractContainer that can add elements at
the begin or end. A LinkedList is clearable.- Version:
- 2016-01-01
- Autor:
- Silvan Wyss
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidaddAtBegin(E element) Adds the given element at the begin of the currentILinkedList.voidaddAtBegin(E[] elements) The time complexity of this implementation is O(n) if n elements are given.voidaddAtBegin(E element, E... elements) Adds the given element and the given elements at the begin of the currentILinkedList.voidaddAtBegin(Iterable<? extends E> elements) Adds the given elements at the begin of the currentILinkedList.voidThe time complexity of this implementation is O(1).voidThe time complexity of this implementation is O(n) if n elements are given.final voidThe time complexity of this implementation is O(n) if n elements are given.voidAdds the given elements at the end of the currentLinkedList.voidclear()Removes all elements of the currentLinkedList.static <E2> LinkedList<E2> booleanAn object equals a list if it is a list containing exactly the same elements.static <E2> LinkedList<E2> fromArray(E2[] array) static <E2> LinkedList<E2> fromIterable(Iterable<E2> container) getCopy()The time complexity of this implementation is O(n) if the currentLinkedListcontains n elements.intgetCount()The time complexity of this implementation is O(1).getStoredAtOneBasedIndex(int oneBasedIndex) The time complexity of this implementation is O(n) if the currentAbstractContainercontains n elements.inthashCode()booleanThe time complexity of this implementation is O(1).iterator()The time complexity of this implementation is O(1).voidThe time complexity of this implementation is O(n) if the currentLinkedListcontains n elements.voidremoveAllOccurrencesOf(Object element) The time complexity of this implementation is O(n) if the currentLinkedListcontains n elements.The time complexity of this implementation is O(1).removeAndGetStoredFirst(Predicate<E> selector) The time complexity of this implementation is O(n) if the currentLinkedListcontains n elements.The time complexity of this implementation is O(1).voidThe time complexity of this implementation is O(1).voidremoveFirst(Predicate<E> selector) The time complexity of this implementation is O(n) if the currentLinkedListcontains n elements.voidremoveFirstOccurrenceOf(Object element) The time complexity of this implementation is O(n) if the currentLinkedListcontains n elements.voidThe time complexity of this implementation is O(1).voidThe time complexity of this implementation is O(n).voidThe time complexity of this implementation is O(n).voidremoveStrictlyFirstOccurrenceOf(Object element) The time complexity of this implementation is O(n).voidreplaceFirst(Predicate<E> selector, E element) The time complexity of this implementation is O(n) if the currentLinkedListcontains n elements.toString()The time complexity of this implementation is O(n) if the currentLinkedListcontains n elements.static <E2> LinkedList<E2> withElement(E2 element, E2... elements) Von Klasse geerbte Methoden ch.nolix.core.container.arraylist.AbstractExtendedContainer
createEmptyMutableList, getViewFromOneBasedStartIndexToOneBasedEndIndex, getViewOf, getViewOfStoredSelected, toOrderedListVon 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, toWithOneBasedIndexVon Klasse geerbte Methoden java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitVon Schnittstelle geerbte Methoden ch.nolix.coreapi.container.commoncontainer.AggregationRequestable
getAverage, getAverageOrZero, getMax, getMaxOrZero, getMedian, getMedianOrZero, getMin, getMinOrZero, getStandardDeviation, getSum, getSumOfInts, getVarianceVon Schnittstelle geerbte Methoden ch.nolix.coreapi.container.commoncontainer.ArrayMappable
toArray, toByteArray, toCharArray, toDoubleArray, toIntArray, toLongArray, toStringArrayVon Schnittstelle geerbte Methoden ch.nolix.coreapi.container.commoncontainer.CountRequestable
getCount, getCountOfVon Schnittstelle geerbte Methoden ch.nolix.coreapi.state.staterequest.EmptinessRequestable
containsAny, isEmptyVon Schnittstelle geerbte Methoden ch.nolix.coreapi.container.base.Filterable
getStoredOfType, getStoredOthers, getStoredSelectedVon Schnittstelle geerbte Methoden ch.nolix.coreapi.container.base.Groupable
getStoredInGroupsVon Schnittstelle geerbte Methoden ch.nolix.coreapi.container.base.IContainer
toOrderedList, toReversedListVon Schnittstelle geerbte Methoden ch.nolix.coreapi.container.base.IFilteringContainerViewProvider
getViewOfStoredSelectedVon Schnittstelle geerbte Methoden ch.nolix.coreapi.container.base.IIntervallContainerViewProvider
getViewFromOneBasedStartIndex, getViewFromOneBasedStartIndexToOneBasedEndIndex, getViewToOneBasedEndIndex, getViewWithoutFirst, getViewWithoutFirst, getViewWithoutLast, getViewWithoutLastVon Schnittstelle geerbte Methoden ch.nolix.coreapi.container.base.IMappingContainerViewProvider
getViewOfVon Schnittstelle geerbte Methoden ch.nolix.coreapi.container.commoncontainer.IndexRequestable
getOneBasedIndexOfFirst, getOneBasedIndexOfFirstEqualElement, getOneBasedIndexOfFirstOccurrenceOfVon Schnittstelle geerbte Methoden java.lang.Iterable
forEach, spliteratorVon Schnittstelle geerbte Methoden ch.nolix.coreapi.container.base.Mappable
to, toMultiples, toNumbers, toStrings, toWithOneBasedIndexVon Schnittstelle geerbte Methoden ch.nolix.coreapi.state.staterequest.MaterializationRequestable
isViewVon Schnittstelle geerbte Methoden ch.nolix.coreapi.container.commoncontainer.SingleSearchable
getOptionalStoredFirst, getOptionalStoredFirst, getStoredByMax, getStoredByMin, getStoredFirst, getStoredFirst, getStoredFirstOfType, getStoredLast, getStoredOne, getStoredOneVon Schnittstelle geerbte Methoden ch.nolix.coreapi.container.commoncontainer.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 ch.nolix.coreapi.container.commoncontainer.StringMappable
toConcatenatedString, toStringWithSeparator, toStringWithSeparator
-
Methodendetails
-
createEmpty
- Typparameter:
E2- is the type of the elements of the createdLinkedList.- Gibt zurück:
- a new empty
LinkedList.
-
fromArray
- Typparameter:
E2- is the type of the elements of the given array.- Parameter:
array-- Gibt zurück:
- a new
LinkedListwith the elements in the given array. - Löst aus:
ArgumentIsNullException- if the given array is null.ArgumentIsNullException- if one of the elements in the given array is null.
-
fromIterable
- Typparameter:
E2- is the type of the elements of the given container.- Parameter:
container-- Gibt zurück:
- a new
LinkedListwith the elements in the given container. - Löst aus:
ArgumentIsNullException- if the given container is null.ArgumentIsNullException- if one of the elements in the given container is null.
-
withElement
- Typparameter:
E2- is the type of the given elements.- Parameter:
element-elements-- Gibt zurück:
- a new
LinkedListwith the given elements. - Löst aus:
ArgumentIsNullException- if the given element or one of the given elements is null.
-
addAtBegin
Adds the given element at the begin of the currentILinkedList.- Angegeben von:
addAtBeginin SchnittstelleILinkedList<E>- Parameter:
element-
-
addAtBegin
Adds the given element and the given elements at the begin of the currentILinkedList. The elements will be added in the given order.- Angegeben von:
addAtBeginin SchnittstelleILinkedList<E>- Parameter:
element-elements-
-
addAtBegin
The time complexity of this implementation is O(n) if n elements are given. Adds the given elements at the begin of the currentILinkedList. The elements will be added in the given order.- Angegeben von:
addAtBeginin SchnittstelleILinkedList<E>- Parameter:
elements-
-
addAtBegin
Adds the given elements at the begin of the currentILinkedList. The elements will be added in the given order.- Angegeben von:
addAtBeginin SchnittstelleILinkedList<E>- Parameter:
elements-
-
addAtEnd
The time complexity of this implementation is O(1). Adds the given element at the end of the currentILinkedList.- Angegeben von:
addAtEndin SchnittstelleILinkedList<E>- Parameter:
element-
-
addAtEnd
The time complexity of this implementation is O(n) if n elements are given. Adds the given element and the given elements at the end of the currentILinkedList. The elements will be added in the given order.- Angegeben von:
addAtEndin SchnittstelleILinkedList<E>- Parameter:
element-elements-
-
addAtEnd
The time complexity of this implementation is O(n) if n elements are given. Adds the given elements at the end of the currentILinkedList. The elements will be added in the given order.- Angegeben von:
addAtEndin SchnittstelleILinkedList<E>- Parameter:
elements-
-
addAtEnd
Adds the given elements at the end of the currentLinkedList. The complexity of this implementation is O(n) if n elements are given.- Angegeben von:
addAtEndin SchnittstelleILinkedList<E>- Parameter:
elements-- Löst aus:
ArgumentIsNullException- if one of the given elements is null.
-
clear
public void clear()Removes all elements of the currentLinkedList. The complexity of this implementation is O(n) when the currentLinkedListcontains n elements. -
equals
An object equals a list if it is a list containing exactly the same elements. -
getCopy
The time complexity of this implementation is O(n) if the currentLinkedListcontains n elements. -
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
LinkedList.
-
getStoredAtOneBasedIndex
The time complexity of this implementation is O(n) if the currentAbstractContainercontains n elements.- Angegeben von:
getStoredAtOneBasedIndexin SchnittstelleSingleSearchable<E>- Parameter:
oneBasedIndex-- Gibt zurück:
- the element at the given index.
- Löst aus:
NonPositiveArgumentException- if the given index is not positive.ArgumentDoesNotHaveAttributeException- if the currentAbstractContainerdoes not contain an element at the given index.
-
hashCode
public int hashCode() -
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).- Angegeben von:
iteratorin SchnittstelleIterable<E>- Angegeben von:
iteratorin SchnittstelleIterableWithCopyableIterator<E>- Gibt zurück:
- a new iterator of the current
LinkedList.
-
removeAll
The time complexity of this implementation is O(n) if the currentLinkedListcontains n elements. Removes all elements from the currentILinkedListthe given selector selects.- Angegeben von:
removeAllin SchnittstelleILinkedList<E>- Parameter:
selector-
-
removeAllOccurrencesOf
The time complexity of this implementation is O(n) if the currentLinkedListcontains n elements. Removes all occurrences of the given element from the currentILinkedList.- Angegeben von:
removeAllOccurrencesOfin SchnittstelleILinkedList<E>- Parameter:
element-
-
removeAndGetStoredFirst
The time complexity of this implementation is O(1). Removes and returns the first element of the currentILinkedList.- Angegeben von:
removeAndGetStoredFirstin SchnittstelleILinkedList<E>- Gibt zurück:
- the first element of the current
ILinkedList.
-
removeAndGetStoredFirst
The time complexity of this implementation is O(n) if the currentLinkedListcontains n elements. Removes and returns the first element the given selector selects from the currentILinkedList.- Angegeben von:
removeAndGetStoredFirstin SchnittstelleILinkedList<E>- Parameter:
selector-- Gibt zurück:
- the first element the given selector selects from the current
ILinkedList.
-
removeAndGetStoredLast
The time complexity of this implementation is O(1). Removes and returns the last element of the currentILinkedList.- Angegeben von:
removeAndGetStoredLastin SchnittstelleILinkedList<E>- Gibt zurück:
- the last element of the current
ILinkedList.
-
removeFirst
public void removeFirst()The time complexity of this implementation is O(1). Removes the first element from the currentILinkedList.- Angegeben von:
removeFirstin SchnittstelleILinkedList<E>
-
removeFirstStrictly
public void removeFirstStrictly()The time complexity of this implementation is O(1). Removes the first element from the currentILinkedList.- Angegeben von:
removeFirstStrictlyin SchnittstelleILinkedList<E>
-
removeFirst
The time complexity of this implementation is O(n) if the currentLinkedListcontains n elements. Removes the first element the given selector selects from the currentILinkedList- Angegeben von:
removeFirstin SchnittstelleILinkedList<E>- Parameter:
selector-
-
removeFirstOccurrenceOf
The time complexity of this implementation is O(n) if the currentLinkedListcontains n elements. Removes the first occurrence of the given element from the currentILinkedList.- Angegeben von:
removeFirstOccurrenceOfin SchnittstelleILinkedList<E>- Parameter:
element-
-
removeLast
public void removeLast()The time complexity of this implementation is O(n). Removes the last element from the currentILinkedList.- Angegeben von:
removeLastin SchnittstelleILinkedList<E>
-
removeLastStrictly
public void removeLastStrictly()The time complexity of this implementation is O(n). Removes the last element from the currentILinkedList.- Angegeben von:
removeLastStrictlyin SchnittstelleILinkedList<E>
-
removeStrictlyFirstOccurrenceOf
The time complexity of this implementation is O(n). Removes the first occurrence of the given element from the currentILinkedList.- Angegeben von:
removeStrictlyFirstOccurrenceOfin SchnittstelleILinkedList<E>- Parameter:
element-
-
replaceFirst
The time complexity of this implementation is O(n) if the currentLinkedListcontains n elements. Replaces the first element the given selector selects from the currentILinkedListwith the given element.- Angegeben von:
replaceFirstin SchnittstelleILinkedList<E>- Parameter:
selector-element-
-
toString
The time complexity of this implementation is O(n) if the currentLinkedListcontains n elements.
-