Class AbstractExtendedIterable<E>
java.lang.Object
ch.nolix.base.datastructure.extendediterable.AbstractExtendedIterable<E>
- Type Parameters:
E- the type of the elements of aAbstractExtendedIterable.
- All Implemented Interfaces:
ArrayMappable<E>, IndexRequestable<E>, IterableWithCopyableIterator<E>, SingleSearchable<E>, StoringRequestable<E>, StringMappable, ExtendedIterable<E>, Filterable<E>, FilteringContainerViewProvider<E>, Groupable<E>, IntervallContainerViewProvider<E>, Mappable<E>, MappingContainerViewProvider<E>, AggregationRequestable<E>, CountRequestable<E>, EmptinessRequestable, MaterializationRequestable, Iterable<E>
- Direct Known Subclasses:
ArrayExtendedIterableView, ArrayList, ExtendedIterableFilterView, ExtendedIterableIntervalView, ExtendedIterableMapperView, ExtendedIterableView, ImmutableList, IterableExtendedIterableView, LinkedList, Matrix, MatrixColumn, MatrixRow, MultiExtendedIterableView, SqlRecord
- Author:
- Silvan Wyss
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanThe time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.final booleancontainsAllOf(Iterable<?> objects) The time complexity of this implementation is O(m*n) if: -The currentAbstractExtendedIterablecontains m elements.final booleancontainsAllOf(Object... objects) The time complexity of this implementation is O(m*n) if: -The currentAbstractExtendedIterablecontains m elements.final booleancontainsAny(Predicate<E> selector) The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.final booleancontainsAnyOf(Iterable<?> objects) The time complexity of this implementation is O(m*n) if: -The currentAbstractExtendedIterablecontains m elements.final booleancontainsAnyOf(Object... objects) The time complexity of this implementation is O(m*n) if: -The currentAbstractExtendedIterablecontains m elements.final booleancontainsAsManyAs(Iterable<?> iterable) The time complexity of this implementation is O(n) if the current container contains n elements.final booleancontainsEqualing(Object element) The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.final booleancontainsExactlyEqualingInSameOrder(Iterable<?> iterable) The time complexity of this implementation is O(m*n) if: The currentAbstractExtendedIterablecontains m elements.final booleancontainsExactlyInSameOrder(Iterable<?> iterable) The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.final booleancontainsLessThan(Iterable<?> iterable) The time complexity of this implementation is O(n) if the given iterable contains n elements.final booleancontainsMoreThan(Iterable<?> iterable) The time complexity of this implementation is O(n) if the given iterable contains n elements.final booleancontainsNone(Predicate<E> selector) The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.final booleancontainsNoneOf(Iterable<?> elements) The time complexity of this implementation is O(m*n) if: -The currentAbstractExtendedIterablecontains m elements.final booleancontainsNoneOf(Object... objects) The time complexity of this implementation is O(m*n) if: -The currentAbstractExtendedIterablecontains m elements.final booleancontainsOnce(Object object) The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.final booleanThe time complexity of this implementation is O(1).final booleancontainsOne(Predicate<E> selector) The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.final booleancontainsOneEqualing(E object) The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.final booleancontainsOnly(Predicate<E> selector) The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.final doublegetAverage(Function<E, Number> valueMapper) The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.final doublegetAverageOrZero(Function<E, Number> mapper) The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.final intThe time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.final intgetCountOf(Object element) The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.final <C extends Comparable<C>>
CThe time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.final doublegetMaxOrZero(Function<E, Number> numberMapper) The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.final doubleThe time complexity of this implementation is O(n*log(n)) if the currentAbstractExtendedIterablecontains n elements.final doublegetMedianOrZero(Function<E, Number> norm) The time complexity of this implementation is O(n*log(n)) if the currentAbstractExtendedIterablecontains n elements.final <C extends Comparable<C>>
CThe time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.final doublegetMinOrZero(Function<E, Number> numberMapper) final intgetOneBasedIndexOfFirst(Predicate<E> selector) The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.final intThe time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.final intThe time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.The time complexity of this implementation is O(1).getOptionalStoredFirst(Predicate<? super E> selector) The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.final doublegetStandardDeviation(Function<E, Number> norm) The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.final <C extends Comparable<C>>
EgetStoredByMax(Function<E, C> comparableMapper) The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.final <C extends Comparable<C>>
EgetStoredByMin(Function<E, C> comparableMapper) The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.final EThe time complexity of this implementation is O(1).final EgetStoredFirst(Predicate<? super E> selector) The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.final <T extends E>
TgetStoredFirstOfType(Class<T> type) The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.final ExtendedIterable<? extends ExtendedIterable<E>> getStoredInGroups(Function<E, ?> norm) The time complexity of this implementation is O(m*n) if: -The currentAbstractExtendedIterablecontains m elements.final EThe time complexity of this implementation is O(1) or O(n) if the currentAbstractExtendedIterablecontains n elements.final <T extends E>
ExtendedIterable<T> getStoredOfType(Class<T> type) The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.final EThe time complexity of this implementation is O(1).final EgetStoredOne(Predicate<? super E> selector) The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.final ExtendedIterable<E> getStoredOthers(Predicate<E> selector) The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.final ExtendedIterable<E> getStoredSelected(Predicate<? super E> selector) The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.final BigDecimalThe time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.final BigIntegergetSumOfInts(ToIntFunction<E> intMapper) The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.final doublegetVariance(Function<E, Number> numberMapper) The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.final ExtendedIterable<E> getViewFromOneBasedStartIndex(int oneBasedStartIndex) The time complexity of this implementation is O(1).final ExtendedIterable<E> getViewFromOneBasedStartIndexToOneBasedEndIndex(int oneBasedStartIndex, int oneBasedEndIndex) The time complexity of this implementation is O(1).final <T> ExtendedIterable<T> The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.final ExtendedIterable<E> getViewOfStoredSelected(Predicate<E> selector) The time complexity of this implementation is O(1).final ExtendedIterable<E> getViewToOneBasedEndIndex(int oneBasedEndIndex) The time complexity of this implementation is O(1).final ExtendedIterable<E> The time complexity of this implementation is O(1).final ExtendedIterable<E> getViewWithoutFirst(int n) The time complexity of this implementation is O(1).final ExtendedIterable<E> The time complexity of this implementation is O(1).final ExtendedIterable<E> getViewWithoutLast(int n) The time complexity of this implementation is O(1).final booleanisEmpty()The time complexity of this implementation is O(1) if the current Container does not contain null elements.final <T> ExtendedIterable<T> The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.final Object[]toArray()The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.final byte[]toByteArray(Function<E, Byte> byteMapper) The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.final char[]toCharArray(Function<E, Character> charMapper) The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.final StringThe time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.final double[]toDoubleArray(ToDoubleFunction<E> doubleMapper) The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.final int[]toIntArray(ToIntFunction<E> intMapper) The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.final long[]toLongArray(ToLongFunction<E> longMapper) The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.final <T> ExtendedIterable<T> toMultiples(Function<E, ExtendedIterable<T>> multipleMapper) The time complexity of this implementation is O(m*n) if: -The current *AbstractExtendedIterablecontains m elements.<N extends Number>
ExtendedIterable<N> The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.final <C extends Comparable<C>>
ExtendedIterable<E> toOrderedList(Function<E, C> norm) The time complexity of this implementation is O(n * log(n)) if the currentAbstractExtendedIterablecontains n elements.final ExtendedIterable<E> The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.final String[]The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.final ExtendedIterable<String> The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.final StringtoStringWithSeparator(char separator) The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.final StringtoStringWithSeparator(String separator) The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.final <T> ExtendedIterable<T> toWithOneBasedIndex(BiFunction<Integer, E, T> mapper) The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.Methods 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
-
AbstractExtendedIterable
public AbstractExtendedIterable()
-
-
Method Details
-
contains
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
containsin interfaceStoringRequestable<E>- Parameters:
object-- Returns:
- true if the current
StoringRequestablecontains the given object, false otherwise.
-
containsAllOf
The time complexity of this implementation is O(m*n) if: -The currentAbstractExtendedIterablecontains m elements. -n objects are given.- Specified by:
containsAllOfin interfaceStoringRequestable<E>- Parameters:
objects-- Returns:
- true if the current
StoringRequestablecontains all of the given objects, false otherwise.
-
containsAllOf
The time complexity of this implementation is O(m*n) if: -The currentAbstractExtendedIterablecontains m elements. -n objects are given.- Specified by:
containsAllOfin interfaceStoringRequestable<E>- Parameters:
objects-- Returns:
- true if the current
StoringRequestablecontains all of the given objects, false otherwise.
-
containsAny
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
containsAnyin interfaceStoringRequestable<E>- Parameters:
selector-- Returns:
- true if the current
StoringRequestablecontains an element the given selector selects, false otherwise. Ignores null elements.
-
containsAnyOf
The time complexity of this implementation is O(m*n) if: -The currentAbstractExtendedIterablecontains m elements. -n objects are given.- Specified by:
containsAnyOfin interfaceStoringRequestable<E>- Parameters:
objects-- Returns:
- true if the current
StoringRequestablecontains any of the given objects, false otherwise.
-
containsAnyOf
The time complexity of this implementation is O(m*n) if: -The currentAbstractExtendedIterablecontains m elements. -n objects are given.- Specified by:
containsAnyOfin interfaceStoringRequestable<E>- Parameters:
objects-- Returns:
- true if the current
StoringRequestablecontains at least one of the given objects, false otherwise.
-
containsAsManyAs
The time complexity of this implementation is O(n) if the current container contains n elements.- Specified by:
containsAsManyAsin interfaceStoringRequestable<E>- Parameters:
iterable-- Returns:
- true if the current
StoringRequestablecontains as many elements as the given container, false otherwise.
-
containsEqualing
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
containsEqualingin interfaceStoringRequestable<E>- Parameters:
element-- Returns:
- true if the current
StoringRequestablecontains an element that equals the given given element, false otherwise.
-
containsExactlyEqualingInSameOrder
The time complexity of this implementation is O(m*n) if: The currentAbstractExtendedIterablecontains m elements. The given iterable contains n elements.- Specified by:
containsExactlyEqualingInSameOrderin interfaceStoringRequestable<E>- Parameters:
iterable-- Returns:
- true if the current
StoringRequestablecontains exactly elements that equal the elements of given iterable in the same order, false otherwise.
-
containsExactlyInSameOrder
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
containsExactlyInSameOrderin interfaceStoringRequestable<E>- Parameters:
iterable-- Returns:
- true if the current
StoringRequestablecontains exactly the elements of the given iterable in the same order, false otherwise.
-
containsLessThan
The time complexity of this implementation is O(n) if the given iterable contains n elements.- Specified by:
containsLessThanin interfaceStoringRequestable<E>- Parameters:
iterable-- Returns:
- true if the current
StoringRequestablecontains less elements than the given container, false otherwise
-
containsMoreThan
The time complexity of this implementation is O(n) if the given iterable contains n elements.- Specified by:
containsMoreThanin interfaceStoringRequestable<E>- Parameters:
iterable-- Returns:
- true if the current
StoringRequestablecontains more elements than the given container, false otherwise.
-
containsNone
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
containsNonein interfaceStoringRequestable<E>- Parameters:
selector-- Returns:
- true if the current
StoringRequestabledoes not contain an element the given selector selects, false otherwise. Ignores null elements.
-
containsNoneOf
The time complexity of this implementation is O(m*n) if: -The currentAbstractExtendedIterablecontains m elements. -n objects are given.- Specified by:
containsNoneOfin interfaceStoringRequestable<E>- Parameters:
elements-- Returns:
- true if the current
StoringRequestabledoes not contain any of the given objects, false otherwise.
-
containsNoneOf
The time complexity of this implementation is O(m*n) if: -The currentAbstractExtendedIterablecontains m elements. -n objects are given.- Specified by:
containsNoneOfin interfaceStoringRequestable<E>- Parameters:
objects-- Returns:
- true if the current
StoringRequestabledoes not contain any of the given objects, false otherwise.
-
containsOnce
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
containsOncein interfaceStoringRequestable<E>- Parameters:
object-- Returns:
- true if the current
StoringRequestablecontains the given object exactly 1 time, false otherwise.
-
containsOne
public final boolean containsOne()The time complexity of this implementation is O(1).- Specified by:
containsOnein interfaceStoringRequestable<E>- Returns:
- true if the current
StoringRequestablecontains exactly 1 element, false otherwise.
-
containsOne
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
containsOnein interfaceStoringRequestable<E>- Parameters:
selector-- Returns:
- true if the current
StoringRequestablecontains exactly 1 element the given selector selects, false otherwise. Ignores null elements.
-
containsOneEqualing
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
containsOneEqualingin interfaceStoringRequestable<E>- Parameters:
object-- Returns:
- true if the current
StoringRequestablecontains exactly 1 element that equals the given object, false otherwise.
-
containsOnly
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
containsOnlyin interfaceStoringRequestable<E>- Parameters:
selector-- Returns:
- true if the current
StoringRequestablecontains only elements the given selector selects, false otherwise.. Null element are regarded as unselectable.
-
getAverage
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
getAveragein interfaceAggregationRequestable<E>- Parameters:
valueMapper-- Returns:
- the average of the values the given valueMapper maps from the
elements of the current
AggregationRequestable. Maps null elements to 0.0.
-
getAverageOrZero
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
getAverageOrZeroin interfaceAggregationRequestable<E>- Parameters:
mapper-- Returns:
- the average of the values the given valueMapper maps from the
elements of the current
AggregationRequestableif the currentAggregationRequestablecontains any, 0.0 otherwise. Maps null elements to 0.0.
-
getCount
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
getCountin interfaceCountRequestable<E>- Parameters:
selector-- Returns:
- the number of elements the given selector selects from the current
CountRequestable. Ignores null elements.
-
getCountOf
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
getCountOfin interfaceCountRequestable<E>- Parameters:
element-- Returns:
- the number how many times the current
CountRequestablecontains the given element.
-
getOneBasedIndexOfFirst
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
getOneBasedIndexOfFirstin interfaceIndexRequestable<E>- Parameters:
selector-- Returns:
- the 1-based index of the first element the given selector selects
from the current
IndexRequestable. Ignores null elements.
-
getOneBasedIndexOfFirstEqualElement
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
getOneBasedIndexOfFirstEqualElementin interfaceIndexRequestable<E>- Parameters:
object-- Returns:
- the 1-based index of the first element of the current
IndexRequestablethat equals the given object.
-
getOneBasedIndexOfFirstOccurrenceOf
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
getOneBasedIndexOfFirstOccurrenceOfin interfaceIndexRequestable<E>- Parameters:
object-- Returns:
- the 1-based index of the first occurrence of the given object in the
current
IndexRequestable.
-
getMax
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
getMaxin interfaceAggregationRequestable<E>- Type Parameters:
C- is the type of theComparables the given comparableMapper maps from the elements of the currentAggregationRequestable.- Parameters:
comparableMapper-- Returns:
- the biggest
Comparablethe given comparableMapper maps from the elements of the currentAggregationRequestable. Ignores null elements.
-
getMaxOrZero
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
getMaxOrZeroin interfaceAggregationRequestable<E>- Parameters:
numberMapper-- Returns:
- the biggest number the given numberMapper maps from the non-null
elements of the current
AggregationRequestableif the currentAggregationRequestablecontains non-null elements, 0.0 otherwise.
-
getMedian
The time complexity of this implementation is O(n*log(n)) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
getMedianin interfaceAggregationRequestable<E>- Parameters:
numberMapper-- Returns:
- the median of the numbers the given numberMapper maps from the
elements of the current
AggregationRequestable. Maps null elements to 0.0.
-
getMedianOrZero
The time complexity of this implementation is O(n*log(n)) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
getMedianOrZeroin interfaceAggregationRequestable<E>- Parameters:
norm-- Returns:
- the median of the numbers the given numberMapper maps from the
elements of the current
AggregationRequestableif the currentAggregationRequestableis not empty, 0.0 otherwise. Maps null elements to 0.0.
-
getMin
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
getMinin interfaceAggregationRequestable<E>- Type Parameters:
C- is the type of theComparables the given comparableMapper maps from the elements of the currentAggregationRequestable.- Parameters:
comparableMapper-- Returns:
- the smallest
Comparablethe given comparableMapper maps from the elements of the currentAggregationRequestable. Ignores null elements.
-
getMinOrZero
- Specified by:
getMinOrZeroin interfaceAggregationRequestable<E>- Parameters:
numberMapper-- Returns:
- the smallest number the given numberMapper maps from the non-null
elements of the current
AggregationRequestableif the currentAggregationRequestablecontains non-null elements, 0.0 otherwise.
-
getOptionalStoredFirst
The time complexity of this implementation is O(1).- Specified by:
getOptionalStoredFirstin interfaceSingleSearchable<E>- Returns:
- a
Optionalwith the first element of the currentSingleSearchableif the currentSingleSearchableis not empty and if the first element of the currentSingleSearchableis not null, an emptyOptionalotherwise.
-
getOptionalStoredFirst
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
getOptionalStoredFirstin interfaceSingleSearchable<E>- Parameters:
selector-- Returns:
- a new
Optionalwith the first element the given selector selects from the currentSingleSearchableif the currentSingleSearchablecontains an element the given selector selects, an emptyOptionalotherwise. Ignores null elements.
-
getStandardDeviation
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
getStandardDeviationin interfaceAggregationRequestable<E>- Parameters:
norm-- Returns:
- the standard deviation of the numbers the given numberMapper maps
from the elements of the current
AggregationRequestable.
-
getStoredByMax
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
getStoredByMaxin interfaceSingleSearchable<E>- Type Parameters:
C- is the type of theComparables the given comparableMapper maps from the elements of the currentSingleSearchable.- Parameters:
comparableMapper-- Returns:
- the element with the biggest
Comparablethe given comparableMapper maps from the elements of the currentSingleSearchable. Ignores null elements.
-
getStoredByMin
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
getStoredByMinin interfaceSingleSearchable<E>- Type Parameters:
C- is the type of theComparables the given comparableMapper maps from the elements of the currentSingleSearchable.- Parameters:
comparableMapper-- Returns:
- the element with the smallest
Comparablethe given comparableMapper maps from the elements of the currentSingleSearchable. Ignores null elements.
-
getStoredFirst
The time complexity of this implementation is O(1).- Specified by:
getStoredFirstin interfaceSingleSearchable<E>- Returns:
- the first element of the current
SingleSearchable. The element can be null.
-
getStoredFirst
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
getStoredFirstin interfaceSingleSearchable<E>- Parameters:
selector-- Returns:
- the first element the given selector selects from the current
SingleSearchable. Ignores null elements.
-
getStoredFirstOfType
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
getStoredFirstOfTypein interfaceSingleSearchable<E>- Type Parameters:
T- is the given type.- Parameters:
type-- Returns:
- the first element from the current
SingleSearchablethat is of the given type.
-
getStoredInGroups
The time complexity of this implementation is O(m*n) if: -The currentAbstractExtendedIterablecontains m elements. -The given norm assignes the elements of the currentAbstractExtendedIterablein n groups.- Specified by:
getStoredInGroupsin interfaceGroupable<E>- Parameters:
norm-- Returns:
- a new
ExtendedIterablewith the elements of the currentGroupablegrouped by the given norm. Ignores null elements.
-
getStoredLast
The time complexity of this implementation is O(1) or O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
getStoredLastin interfaceSingleSearchable<E>- Returns:
- the last element of the current
SingleSearchable. The element can be null.
-
getStoredOfType
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
getStoredOfTypein interfaceFilterable<E>- Type Parameters:
T- is the type of the elements of the returnedExtendedIterable.- Parameters:
type-- Returns:
- a new
ExtendedIterablewith the elements from the currentFilterablethat are of the given type. Ignores null elements.
-
getStoredOne
The time complexity of this implementation is O(1).- Specified by:
getStoredOnein interfaceSingleSearchable<E>- Returns:
- the one element of the current
SingleSearchable. The element can be null.
-
getStoredOne
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
getStoredOnein interfaceSingleSearchable<E>- Parameters:
selector-- Returns:
- the one element the given selector selects from the current
SingleSearchable. Ignores null elements.
-
getStoredOthers
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
getStoredOthersin interfaceFilterable<E>- Parameters:
selector-- Returns:
- a new
ExtendedIterablewith the elements from the currentFilterablethe given selector skips. Ignores null elements.
-
getStoredSelected
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
getStoredSelectedin interfaceFilterable<E>- Parameters:
selector-- Returns:
- a new
ExtendedIterablewith the elements the given selector selects from the currentFilterable. Ignores null elements.
-
getSum
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
getSumin interfaceAggregationRequestable<E>- Parameters:
valueMapper-- Returns:
- the sum of the values the given valueMapper maps from the elements of
the current
AggregationRequestable. Maps null elements to 0.0.
-
getSumOfInts
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
getSumOfIntsin interfaceAggregationRequestable<E>- Parameters:
intMapper-- Returns:
- the sum of the ints the given intMapper maps from the elements of the
current
AggregationRequestable. Maps null elements to 0.0.
-
getVariance
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
getVariancein interfaceAggregationRequestable<E>- Parameters:
numberMapper-- Returns:
- the variance of the numbers the given numberMapper maps from the
elements of the current
AggregationRequestable. Maps null elements to 0.0.
-
getViewOf
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
getViewOfin interfaceMappingContainerViewProvider<E>- Type Parameters:
T- is the type of the elements the given mapper maps from the elements of the currentMappingContainerViewProvider.- Parameters:
mapper-- Returns:
- a new
ExtendedIterablewith the elements the given mapper maps from the elements of the currentMappingContainerViewProvider.
-
getViewFromOneBasedStartIndex
The time complexity of this implementation is O(1).- Specified by:
getViewFromOneBasedStartIndexin interfaceIntervallContainerViewProvider<E>- Parameters:
oneBasedStartIndex-- Returns:
- a new view of the current
IntervallContainerViewProviderfrom the given oneBasedStartIndex.
-
getViewFromOneBasedStartIndexToOneBasedEndIndex
public final ExtendedIterable<E> getViewFromOneBasedStartIndexToOneBasedEndIndex(int oneBasedStartIndex, int oneBasedEndIndex) The time complexity of this implementation is O(1).- Specified by:
getViewFromOneBasedStartIndexToOneBasedEndIndexin interfaceIntervallContainerViewProvider<E>- Parameters:
oneBasedStartIndex-oneBasedEndIndex-- Returns:
- a new view of the current
IntervallContainerViewProviderfrom the given oneBasedStartIndex to the given oneBasedEndIndex.
-
getViewOfStoredSelected
The time complexity of this implementation is O(1).- Specified by:
getViewOfStoredSelectedin interfaceFilteringContainerViewProvider<E>- Parameters:
selector-- Returns:
- a new
ExtendedIterableview with the elements the given selector selects from the currentFilteringContainerViewProvider. Ignores null elements.
-
getViewToOneBasedEndIndex
The time complexity of this implementation is O(1).- Specified by:
getViewToOneBasedEndIndexin interfaceIntervallContainerViewProvider<E>- Parameters:
oneBasedEndIndex-- Returns:
- a new view
ExtendedIterableof the currentIntervallContainerViewProviderto the given oneBasedEndIndex.
-
getViewWithoutFirst
The time complexity of this implementation is O(1).- Specified by:
getViewWithoutFirstin interfaceIntervallContainerViewProvider<E>- Returns:
- a new view
ExtendedIterableview of the currentIntervallContainerViewProviderwithout the first element.
-
getViewWithoutFirst
The time complexity of this implementation is O(1).- Specified by:
getViewWithoutFirstin interfaceIntervallContainerViewProvider<E>- Parameters:
n-- Returns:
- a new view
ExtendedIterableview of the currentIntervallContainerViewProviderwithout the first n elements.
-
getViewWithoutLast
The time complexity of this implementation is O(1).- Specified by:
getViewWithoutLastin interfaceIntervallContainerViewProvider<E>- Returns:
- a new view
ExtendedIterableview of the currentIntervallContainerViewProviderwithout the last element.
-
getViewWithoutLast
The time complexity of this implementation is O(1).- Specified by:
getViewWithoutLastin interfaceIntervallContainerViewProvider<E>- Parameters:
n-- Returns:
- a new view
ExtendedIterableof the currentIntervallContainerViewProviderwithout the last n elements.
-
isEmpty
public final boolean isEmpty()The time complexity of this implementation is O(1) if the current Container does not contain null elements. The time complexity of this implementation is O(n) if the current Container contains null elements and if the current Container contains n elements.- Specified by:
isEmptyin interfaceEmptinessRequestable- Returns:
- true if
EmptinessRequestabledoes not contain an element, false otherwise.
-
to
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements. -
toArray
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
toArrayin interfaceArrayMappable<E>- Returns:
- a new array with the elements of the current
ArrayMappable.
-
toByteArray
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
toByteArrayin interfaceArrayMappable<E>- Parameters:
byteMapper-- Returns:
- a new array with the bytes the given byteMapper maps from the
elements of the current
ArrayMappable. Maps null elements to 0.
-
toCharArray
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
toCharArrayin interfaceArrayMappable<E>- Parameters:
charMapper-- Returns:
- a new array with the chars the given charMapper maps from the
elements of the current
ArrayMappable. Maps null elements to a space.
-
toConcatenatedString
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
toConcatenatedStringin interfaceStringMappable- Returns:
- a concatenation of the
Stringrepresentations of the elements of the currentStringMappable.
-
toDoubleArray
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
toDoubleArrayin interfaceArrayMappable<E>- Parameters:
doubleMapper-- Returns:
- a new array with the doubles the given doubleMapper maps from the
elements of the current
ArrayMappable. Maps null elements to 0.0.
-
toIntArray
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
toIntArrayin interfaceArrayMappable<E>- Parameters:
intMapper-- Returns:
- a new array with the ints the given intMapper maps from the elements
of the current
ArrayMappable. Maps null elements to 0. Maps null elements to 0.
-
toLongArray
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
toLongArrayin interfaceArrayMappable<E>- Parameters:
longMapper-- Returns:
- a new array with the longs the given longMapper maps from the
elements of the current
ArrayMappable. Maps null elements to 0.
-
toMultiples
The time complexity of this implementation is O(m*n) if: -The current *AbstractExtendedIterablecontains m elements. -On average, the given multipleMapper maps n elements from an element of the currentAbstractExtendedIterable.- Specified by:
toMultiplesin interfaceMappable<E>- Type Parameters:
T- is the type of the elements of theExtendedIterables the given multipleMapper maps from the elements of the currentMappable.- Parameters:
multipleMapper-- Returns:
- a new
ExtendedIterablewith the elements of theExtendedIterables the given multipleMapper maps from the elements of the currentMappable.
-
toNumbers
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
toNumbersin interfaceMappable<E>- Type Parameters:
N- is the type of theNumbers the given numberMapper maps from the elements of the currentMappable.- Parameters:
numberMapper-- Returns:
- a new
ExtendedIterablewith theNumbers the given numberMapper maps from the elements of the currentMappable. Maps null elements to 0.0.
-
toOrderedList
The time complexity of this implementation is O(n * log(n)) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
toOrderedListin interfaceExtendedIterable<E>- Type Parameters:
C- is the type of theComparables the given comparableMapper returns.- Parameters:
norm-- Returns:
- a new
ExtendedIterablewith the elements of the currentExtendedIterableordered from the smallest to the biggest element according to theComparables the given comparableMapper maps from the elements of the currentExtendedIterable.
-
toReversedList
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
toReversedListin interfaceExtendedIterable<E>- Returns:
- a new
ExtendedIterablewith the elements of the currentExtendedIterablein reversed order.
-
toStringArray
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
toStringArrayin interfaceArrayMappable<E>- Returns:
- a new array with the
Stringrepresentations of the elements of the currentArrayMappable.
-
toStrings
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
toStringsin interfaceMappable<E>- Returns:
- a new
ExtendedIterablewith theStringrepresentations of the elements of the currentExtendedIterable.
-
toStringWithSeparator
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
toStringWithSeparatorin interfaceStringMappable- Parameters:
separator-- Returns:
- a concatenation of the
Stringrepresentations of the elements of the currentStringMappablewith the given separator in between.
-
toStringWithSeparator
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
toStringWithSeparatorin interfaceStringMappable- Parameters:
separator-- Returns:
- a concatenation of the
Stringrepresentations of the elements of the currentStringMappablewith the given separator in between.
-
toWithOneBasedIndex
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
toWithOneBasedIndexin interfaceMappable<E>- Type Parameters:
T- is the type of the elements the given mapper maps from the elements of the currentMappableand from the one-based index of these elements.- Parameters:
mapper-- Returns:
- a new
ExtendedIterablewith the elements the given mapper maps from the elements of the currentMappableand from the one-based index of these elements.
-