Class AbstractExtendedContainer<E>
java.lang.Object
ch.nolix.base.container.base.AbstractContainer<E>
ch.nolix.base.container.arraylist.AbstractExtendedContainer<E>
- Type Parameters:
E- is the type of the elements of aAbstractExtendedContainer.
- All Implemented Interfaces:
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, EmptinessRequestable, MaterializationRequestable, Iterable<E>
- Direct Known Subclasses:
ArrayContainerView, ArrayList, ContainerView, FilterContainerView, ImmutableList, IntervallContainerView, IterableContainerView, LinkedList, MappingContainerView, Matrix, MatrixColumn, MatrixRow, MultiContainerView, SingleContainer, SqlRecord
- Author:
- Silvan Wyss
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal IContainer<E> getViewFromOneBasedStartIndexToOneBasedEndIndex(int oneBasedStartIndex, int oneBasedEndIndex) final <T> IContainer<T> The time complexity of this implementation is O(n) if the currentAbstractContainercontains n elements.final IContainer<E> getViewOfStoredSelected(Predicate<E> selector) The time complexity of this implementation is O(1).final <C extends Comparable<C>>
IContainer<E> toOrderedList(Function<E, C> norm) The time complexity of this implementation is O(n * log(n)) if the currentAbstractContainercontains n elements.Methods inherited from class AbstractContainer
contains, containsAllOf, containsAllOf, containsAny, containsAnyOf, containsAnyOf, containsAsManyAs, containsEqualing, containsExactlyEqualingInSameOrder, containsExactlyInSameOrder, containsLessThan, containsMoreThan, containsNone, containsNoneOf, 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, toWithOneBasedIndexMethods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CountRequestable
getCountMethods inherited from interface EmptinessRequestable
containsAnyMethods inherited from interface Iterable
forEach, spliteratorMethods inherited from interface IterableWithCopyableIterator
iteratorMethods inherited from interface MaterializationRequestable
isMaterialized, isViewMethods inherited from interface SingleSearchable
getStoredAtOneBasedIndex
-
Constructor Details
-
AbstractExtendedContainer
public AbstractExtendedContainer()
-
-
Method Details
-
getViewFromOneBasedStartIndexToOneBasedEndIndex
public final IContainer<E> getViewFromOneBasedStartIndexToOneBasedEndIndex(int oneBasedStartIndex, int oneBasedEndIndex) - Parameters:
oneBasedStartIndex-oneBasedEndIndex-- Returns:
- a new view of the current
IIntervallContainerViewProviderfrom the given oneBasedStartIndex to the given oneBasedEndIndex.
-
getViewOf
The time complexity of this implementation is O(n) if the currentAbstractContainercontains n elements. The time complexity of this implementation is O(n) if the currentAbstractContainercontains n elements.- Specified by:
getViewOfin interfaceIMappingContainerViewProvider<E>- Overrides:
getViewOfin classAbstractContainer<E>- Type Parameters:
T- is the type of the elements the given mapper maps from the elements of the currentIMappingContainerViewProvider.- Parameters:
mapper-- Returns:
- a new
IContainerwith the elements the given mapper maps from the elements of the currentIMappingContainerViewProvider.
-
getViewOfStoredSelected
The time complexity of this implementation is O(1).- Parameters:
selector-- Returns:
- a new
IContainerview with the elements the given selector selects from the currentIFilteringContainerViewProvider. Ignores null elements.
-
toOrderedList
The time complexity of this implementation is O(n * log(n)) if the currentAbstractContainercontains n elements.- Type Parameters:
C- is the type of theComparables the given comparableMapper returns.- Parameters:
norm-- Returns:
- a new
IContainerwith the elements of the currentIContainerordered from the smallest to the biggest element according to theComparables the given comparableMapper maps from the elements of the currentIContainer.
-