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:
IterableWithCopyableIterator<E>, ExtendedIterable<E>, IterableFilterProvider<E>, IterableFilterViewProvider<E>, IterableGroupProvider<E>, IterableIntervalViewProvider<E>, IterableMappedProvider<E>, IterableMappedViewProvider<E>, IterableOrderProvider<E>, IterableArrayProvider<E>, IterableByExtremumProvider<E>, IterableByIndexProvider<E>, IterableFirstProvider<E>, IterableLastProvider<E>, IterableStringProvider, IterableContainAnyRequestable, IterableContainEqualRequestable<E>, IterableContainMatchingRequestable<E>, IterableContainMultipleRequestable, IterableContainObjectRequestable, IterableOneBasedIndexRequestable<E>, AggregationRequestable<E>, BaseCountRequestable, CountRequestable<E>, SingleProvider<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 method is O(n) if the currentIterableContainObjectRequestablecontains n elements.final booleancontainsAll(Iterable<?> objects) The time complexity of this method is O(m*n) if the currentIterableContainMultipleRequestablecontains m elements and n objects are given.final booleancontainsAll(Object... objects) The time complexity of this method is O(m*n) if the currentIterableContainMultipleRequestablecontains m elements and n objects are given.final booleanThe time complexity of this method is O(1).final booleancontainsAny(Iterable<?> objects) The time complexity of this method is O(m*n) if the currentIterableContainMultipleRequestablecontains m elements and n objects are given.final booleancontainsAny(Object... objects) The time complexity of this method is O(m*n) if the currentIterableContainMultipleRequestablecontains m elements and n objects are given.final booleancontainsEqual(Object object) The time complexity of this method is O(n) if the currentIterableContainEqualRequestablecontains n elements.final booleancontainsExactlyAllEqualInSameOrder(Iterable<?> objects) The time complexity of this method is O(n) if the currentIterableContainMultipleRequestablecontains n elements.final booleancontainsExactlyInSameOrder(Iterable<?> iterable) The time complexity of this implementation is O(n) if the currentIterableContainMultipleRequestablecontains n elements.final booleancontainsMatching(Predicate<E> selector) The time complexity of this method is O(n) if the currentIterableContainMatchingRequestablecontains n elements.final booleancontainsMatchingOnly(Predicate<E> selector) The time complexity of this implementation is O(n) if the currentIterableContainMatchingRequestablecontains n elements.final booleancontainsNoEqual(E object) The time complexity of this method is O(n) if the currentIterableContainEqualRequestablecontains n elements.final booleancontainsNoMatching(Predicate<E> selector) The time complexity of this method is O(n) if the currentIterableContainMatchingRequestablecontains n elements.final booleancontainsNone(Iterable<?> elements) The time complexity of this method is O(m*n) if the currentIterableContainMultipleRequestablecontains m elements and n objects are given.final booleancontainsNone(Object... objects) The time complexity of this method is O(m*n) if the currentIterableContainMultipleRequestablecontains m elements and n objects are given.final booleanThe time complexity of this method is O(n) if the currentIterableContainAnyRequestablecontains n elements.final booleancontainsOnce(Object object) The time complexity of this method is O(n) if the currentIterableContainObjectRequestablecontains n elements.final booleanThe time complexity of this method is O(1).final booleancontainsOneEqual(E object) The time complexity of this method is O(n) if the currentIterableContainEqualRequestablecontains n elements.final booleancontainsOneMatching(Predicate<E> selector) The time complexity of this method is O(n) if the currentIterableContainMatchingRequestablecontains n elements.final booleanThe time complexity of this method is O(n) if the current currentIterableContainAnyRequestablecontains n elements.final booleancontainsOnly(Object object) The time complexity of this method is O(n) if the currentIterableContainObjectRequestablecontains 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 method is O(1).getOptionalStoredFirst(Predicate<? super E> selector) The time complexity of this method is O(n) if the currentIterableFirstProvidercontains 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 method is O(1).final EgetStoredFirst(Predicate<? super E> selector) The time complexity of this method is O(n) if the currentIterableFirstProvidercontains n elements.final EThe time complexity of this method is O(n) if the currentIterableFirstProvidercontains n elements.final <T extends E>
TgetStoredFirstOfType(Class<T> type) The time complexity of this method is O(n) if the currentIterableFirstProvidercontains 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 method is O(1).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 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 EThe time complexity of this method is O(1).final EgetStoredSingle(Predicate<? super E> selector) The time complexity of this method is O(n) if the currentSingleProvidercontains 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 method is O(1).final <T> ExtendedIterable<T> The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.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 method is O(n) if the currentIterableArrayProvidercontains n elements.final char[]toCharArray(Function<E, Character> charMapper) The time complexity of this method is O(n) if the currentIterableArrayProvidercontains 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 method is O(n) if the currentIterableArrayProvidercontains n elements.final int[]toIntArray(ToIntFunction<E> intMapper) The time complexity of this method is O(n) if the currentIterableArrayProvidercontains n elements.final long[]toLongArray(ToLongFunction<E> longMapper) The time complexity of this method is O(n) if the currentIterableArrayProvidercontains 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.final <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> The time complexity of this method is O(n*log(n)) if the currentIterableOrderProvidercontains n elements.final ExtendedIterable<E> The time complexity of this method is O(n) if the currentIterableOrderProvidercontains n elements.final String[]The time complexity of this method is O(n) if the currentIterableArrayProvidercontains n elements.final ExtendedIterable<String> The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.final StringtoStringWithDelimiter(char delimiter) The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.final StringtoStringWithDelimiter(String delimiter) 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 BaseCountRequestable
getCountMethods inherited from interface Iterable
forEach, spliteratorMethods inherited from interface IterableByIndexProvider
getStoredAtOneBasedIndexMethods inherited from interface IterableWithCopyableIterator
iteratorMethods inherited from interface MaterializationRequestable
isMaterialized, isView
-
Constructor Details
-
AbstractExtendedIterable
public AbstractExtendedIterable()
-
-
Method Details
-
contains
The time complexity of this method is O(n) if the currentIterableContainObjectRequestablecontains n elements.- Specified by:
containsin interfaceIterableContainObjectRequestable- Parameters:
object-- Returns:
- true if the current
IterableContainObjectRequestablecontains the given object, false otherwise
-
containsAll
The time complexity of this method is O(m*n) if the currentIterableContainMultipleRequestablecontains m elements and n objects are given.- Specified by:
containsAllin interfaceIterableContainMultipleRequestable- Parameters:
objects- the searched objects, is considered to be empty when is null- Returns:
- true if the current
IterableContainMultipleRequestablecontains all of the given objects, false otherwise
-
containsAll
The time complexity of this method is O(m*n) if the currentIterableContainMultipleRequestablecontains m elements and n objects are given.- Specified by:
containsAllin interfaceIterableContainMultipleRequestable- Parameters:
objects- the searched objects, is considered to be empty when is null- Returns:
- true if the current
IterableContainMultipleRequestablecontains all of the given objects, false otherwise
-
containsMatching
The time complexity of this method is O(n) if the currentIterableContainMatchingRequestablecontains n elements.- Specified by:
containsMatchingin interfaceIterableContainMatchingRequestable<E>- Parameters:
selector- can select elements, is considered not to select any element when is null- Returns:
- true if the current
IterableContainMatchingRequestablecontains an element the given selector selects, false otherwise, ignoring null elements
-
containsAny
public final boolean containsAny()The time complexity of this method is O(1).- Specified by:
containsAnyin interfaceEmptinessRequestable- Specified by:
containsAnyin interfaceIterableContainAnyRequestable- Returns:
- true if the current
EmptinessRequestablecontains one or several elements, false otherwise
-
containsAny
The time complexity of this method is O(m*n) if the currentIterableContainMultipleRequestablecontains m elements and n objects are given.- Specified by:
containsAnyin interfaceIterableContainMultipleRequestable- Parameters:
objects- the searched objects, is considered to be empty when is null- Returns:
- true if the current
IterableContainMultipleRequestablecontains any of the given objects, false otherwise
-
containsAny
The time complexity of this method is O(m*n) if the currentIterableContainMultipleRequestablecontains m elements and n objects are given.- Specified by:
containsAnyin interfaceIterableContainMultipleRequestable- Parameters:
objects- the searched objects, is considered to be empty when is null- Returns:
- true if the current
IterableContainMultipleRequestablecontains at least one of the given objects, false otherwise
-
containsEqual
The time complexity of this method is O(n) if the currentIterableContainEqualRequestablecontains n elements.- Specified by:
containsEqualin interfaceIterableContainEqualRequestable<E>- Parameters:
object-- Returns:
- true if the current
IterableContainEqualRequestablecontains an element that equals the given object, false otherwise
-
containsExactlyAllEqualInSameOrder
The time complexity of this method is O(n) if the currentIterableContainMultipleRequestablecontains n elements.- Specified by:
containsExactlyAllEqualInSameOrderin interfaceIterableContainMultipleRequestable- Parameters:
objects- the searched objects, is considered to be empty when is null- Returns:
- true if the current
IterableContainMultipleRequestablecontains exactly such 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 currentIterableContainMultipleRequestablecontains n elements.- Specified by:
containsExactlyInSameOrderin interfaceIterableContainMultipleRequestable- Parameters:
iterable- the searched iterable, is considered to be empty when is null- Returns:
- true if the current
IterableContainMultipleRequestablecontains exactly the elements of the given iterable in the same order, false otherwise
-
containsMatchingOnly
The time complexity of this implementation is O(n) if the currentIterableContainMatchingRequestablecontains n elements.- Specified by:
containsMatchingOnlyin interfaceIterableContainMatchingRequestable<E>- Parameters:
selector- can select elements, is considered not to select any element when is null- Returns:
- true if the current
IterableContainMatchingRequestablecontains only elements the given selector selects, but at least 1 time, false otherwise, ignoring null elements
-
containsNoEqual
The time complexity of this method is O(n) if the currentIterableContainEqualRequestablecontains n elements.- Specified by:
containsNoEqualin interfaceIterableContainEqualRequestable<E>- Parameters:
object-- Returns:
- true if the current
IterableContainEqualRequestabledoes not contain an element that equals the given object, false otherwise
-
containsNoMatching
The time complexity of this method is O(n) if the currentIterableContainMatchingRequestablecontains n elements.- Specified by:
containsNoMatchingin interfaceIterableContainMatchingRequestable<E>- Parameters:
selector- can select elements, is considered not to select any element when is null- Returns:
- true if the current
IterableContainMatchingRequestabledoes not contain an element the given selector selects, false otherwise, ignoring null elements
-
containsNone
The time complexity of this method is O(m*n) if the currentIterableContainMultipleRequestablecontains m elements and n objects are given.- Specified by:
containsNonein interfaceIterableContainMultipleRequestable- Parameters:
elements- the searched objects, is considered to be empty when is null- Returns:
- true if the current
IterableContainMultipleRequestabledoes not contain any of the given objects, false otherwise
-
containsNone
The time complexity of this method is O(m*n) if the currentIterableContainMultipleRequestablecontains m elements and n objects are given.- Specified by:
containsNonein interfaceIterableContainMultipleRequestable- Parameters:
objects- the searched objects, is considered to be empty when is null- Returns:
- true if the current
IterableContainMultipleRequestabledoes not contain any of the given objects, false otherwise
-
containsNonNull
public final boolean containsNonNull()The time complexity of this method is O(n) if the currentIterableContainAnyRequestablecontains n elements.- Specified by:
containsNonNullin interfaceIterableContainAnyRequestable- Returns:
- true if the current
IterableContainAnyRequestablecontains a non-null element, false otherwise
-
containsOnce
The time complexity of this method is O(n) if the currentIterableContainObjectRequestablecontains n elements.- Specified by:
containsOncein interfaceIterableContainObjectRequestable- Parameters:
object-- Returns:
- true if the current
IterableContainObjectRequestablecontains the given object exactly 1 time, false otherwise
-
containsOne
public final boolean containsOne()The time complexity of this method is O(1).- Specified by:
containsOnein interfaceIterableContainAnyRequestable- Returns:
- true if the current
IterableContainAnyRequestablecontains exactly 1 element, false otherwise
-
containsOneEqual
The time complexity of this method is O(n) if the currentIterableContainEqualRequestablecontains n elements.- Specified by:
containsOneEqualin interfaceIterableContainEqualRequestable<E>- Parameters:
object-- Returns:
- true if the current
IterableContainEqualRequestablecontains exactly 1 element that equals the given object, false otherwise
-
containsOneMatching
The time complexity of this method is O(n) if the currentIterableContainMatchingRequestablecontains n elements.- Specified by:
containsOneMatchingin interfaceIterableContainMatchingRequestable<E>- Parameters:
selector- can select elements, is considered not to select any element when is null- Returns:
- true if the current
IterableContainMatchingRequestablecontains exactly 1 element the given selector selects, false otherwise, ignoring null elements
-
containsOneNoneNull
public final boolean containsOneNoneNull()The time complexity of this method is O(n) if the current currentIterableContainAnyRequestablecontains n elements.- Specified by:
containsOneNoneNullin interfaceIterableContainAnyRequestable- Returns:
- true if the current
IterableContainAnyRequestablecontains exactly 1 non-null element, false otherwise
-
containsOnly
The time complexity of this method is O(n) if the currentIterableContainObjectRequestablecontains n elements.- Specified by:
containsOnlyin interfaceIterableContainObjectRequestable- Parameters:
object-- Returns:
- true if the current
IterableContainObjectRequestablecontains only the given object, but at least 1 time, false otherwise
-
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, ignoring 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 interfaceIterableOneBasedIndexRequestable<E>- Parameters:
selector-- Returns:
- the 1-based index of the first element the given selector selects
from the current
IterableOneBasedIndexRequestable, ignoring null elements
-
getOneBasedIndexOfFirstEqualElement
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
getOneBasedIndexOfFirstEqualElementin interfaceIterableOneBasedIndexRequestable<E>- Parameters:
object-- Returns:
- the 1-based index of the first element of the current
IterableOneBasedIndexRequestablethat equals the given object
-
getOneBasedIndexOfFirstOccurrenceOf
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
getOneBasedIndexOfFirstOccurrenceOfin interfaceIterableOneBasedIndexRequestable<E>- Parameters:
object-- Returns:
- the 1-based index of the first occurrence of the given object in the
current
IterableOneBasedIndexRequestable
-
getMax
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
getMaxin interfaceAggregationRequestable<E>- Type Parameters:
C- 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- 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 method is O(1).- Specified by:
getOptionalStoredFirstin interfaceIterableFirstProvider<E>- Returns:
- a
Optionalwith the first element of the currentIterableFirstProviderif the currentIterableFirstProvideris not empty and if the first element of the currentIterableFirstProvideris not null, an emptyOptionalotherwise
-
getOptionalStoredFirst
The time complexity of this method is O(n) if the currentIterableFirstProvidercontains n elements.- Specified by:
getOptionalStoredFirstin interfaceIterableFirstProvider<E>- Parameters:
selector- can select elements, is considered not to select any element when is null- Returns:
- a new
Optionalwith the first element the given selector selects from the currentIterableFirstProviderif the currentIterableFirstProvidercontains an element the given selector selects, an emptyOptionalotherwise, ignoring 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. The time complexity of this method is O(n) if the currentIterableByExtremumProvidercontains n elements.- Specified by:
getStoredByMaxin interfaceIterableByExtremumProvider<E>- Type Parameters:
C- the type of theComparables the given comparableMapper maps from the elements of the currentIterableByExtremumProvider- Parameters:
comparableMapper-- Returns:
- the last (!) element with the biggest
Comparablethe given comparableMapper maps from the elements of the currentIterableByExtremumProvider, ignoring null elements
-
getStoredByMin
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements. The time complexity of this method is O(n) if the currentIterableByExtremumProvidercontains n elements.- Specified by:
getStoredByMinin interfaceIterableByExtremumProvider<E>- Type Parameters:
C- the type of theComparables the given comparableMapper maps from the elements of the currentIterableByExtremumProvider- Parameters:
comparableMapper-- Returns:
- the first (!) element with the smallest
Comparablethe given comparableMapper maps from the elements of the currentIterableByExtremumProvider, ignoring null elements
-
getStoredFirst
The time complexity of this method is O(1).- Specified by:
getStoredFirstin interfaceIterableFirstProvider<E>- Returns:
- the first element of the current
IterableFirstProvider
-
getStoredFirstNonNull
The time complexity of this method is O(n) if the currentIterableFirstProvidercontains n elements.- Specified by:
getStoredFirstNonNullin interfaceIterableFirstProvider<E>- Returns:
- the first non-null element of the current
IterableFirstProvider
-
getStoredFirst
The time complexity of this method is O(n) if the currentIterableFirstProvidercontains n elements.- Specified by:
getStoredFirstin interfaceIterableFirstProvider<E>- Parameters:
selector- can select elements, is considered not to select any element when is null- Returns:
- the first element the given selector selects from the current
IterableFirstProvider, ignoring null elements
-
getStoredFirstOfType
The time complexity of this method is O(n) if the currentIterableFirstProvidercontains n elements.- Specified by:
getStoredFirstOfTypein interfaceIterableFirstProvider<E>- Type Parameters:
T- the modeled type of the given type- Parameters:
type-- Returns:
- the first element from the current
IterableFirstProviderthat 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 interfaceIterableGroupProvider<E>- Parameters:
norm-- Returns:
- a new
ExtendedIterablewith the elements of the currentIterableGroupProvidergrouped by the given norm, ignoring null elements
-
getStoredLast
The time complexity of this method is O(1).- Specified by:
getStoredLastin interfaceIterableLastProvider<E>- Returns:
- the last element of the current
IterableLastProvider
-
getStoredOfType
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
getStoredOfTypein interfaceIterableFilterProvider<E>- Type Parameters:
T- the type of the elements of the returnedExtendedIterable- Parameters:
type-- Returns:
- a new
ExtendedIterablewith the elements from the currentIterableFilterProviderthat are of the given type, ignoring null elements
-
getStoredSingle
The time complexity of this method is O(1).- Specified by:
getStoredSinglein interfaceSingleProvider<E>- Returns:
- the single element of the current
SingleProvider
-
getStoredSingle
The time complexity of this method is O(n) if the currentSingleProvidercontains n elements.- Specified by:
getStoredSinglein interfaceSingleProvider<E>- Parameters:
selector- can select elements, is considered not to select any element when is null- Returns:
- the one element the given selector selects from the current
SingleProvider, ignoring null elements
-
getStoredOthers
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
getStoredOthersin interfaceIterableFilterProvider<E>- Parameters:
selector-- Returns:
- a new
ExtendedIterablewith the elements from the currentIterableFilterProviderthe given selector skips, ignoring null elements
-
getStoredSelected
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
getStoredSelectedin interfaceIterableFilterProvider<E>- Parameters:
selector-- Returns:
- a new
ExtendedIterablewith the elements the given selector selects from the currentIterableFilterProvider, ignoring 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 interfaceIterableMappedViewProvider<E>- Type Parameters:
T- the type of the elements the given mapper maps from the elements of the currentIterableMappedViewProvider- Parameters:
mapper-- Returns:
- a new
ExtendedIterablewith the elements the given mapper maps from the elements of the currentIterableMappedViewProvider
-
getViewFromOneBasedStartIndex
The time complexity of this implementation is O(1).- Specified by:
getViewFromOneBasedStartIndexin interfaceIterableIntervalViewProvider<E>- Parameters:
oneBasedStartIndex-- Returns:
- a new view of the current
IterableIntervalViewProviderfrom 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 interfaceIterableIntervalViewProvider<E>- Parameters:
oneBasedStartIndex-oneBasedEndIndex-- Returns:
- a new view of the current
IterableIntervalViewProviderfrom the given oneBasedStartIndex to the given oneBasedEndIndex
-
getViewOfStoredSelected
The time complexity of this implementation is O(1).- Specified by:
getViewOfStoredSelectedin interfaceIterableFilterViewProvider<E>- Parameters:
selector-- Returns:
- a new
ExtendedIterableview with the elements the given selector selects from the currentIterableFilterViewProvider, ignoring null elements
-
getViewToOneBasedEndIndex
The time complexity of this implementation is O(1).- Specified by:
getViewToOneBasedEndIndexin interfaceIterableIntervalViewProvider<E>- Parameters:
oneBasedEndIndex-- Returns:
- a new view
ExtendedIterableof the currentIterableIntervalViewProviderto the given oneBasedEndIndex
-
getViewWithoutFirst
The time complexity of this implementation is O(1).- Specified by:
getViewWithoutFirstin interfaceIterableIntervalViewProvider<E>- Returns:
- a new view
ExtendedIterableview of the currentIterableIntervalViewProviderwithout the first element
-
getViewWithoutFirst
The time complexity of this implementation is O(1).- Specified by:
getViewWithoutFirstin interfaceIterableIntervalViewProvider<E>- Parameters:
n-- Returns:
- a new view
ExtendedIterableview of the currentIterableIntervalViewProviderwithout the first n elements
-
getViewWithoutLast
The time complexity of this implementation is O(1).- Specified by:
getViewWithoutLastin interfaceIterableIntervalViewProvider<E>- Returns:
- a new view
ExtendedIterableview of the currentIterableIntervalViewProviderwithout the last element
-
getViewWithoutLast
The time complexity of this implementation is O(1).- Specified by:
getViewWithoutLastin interfaceIterableIntervalViewProvider<E>- Parameters:
n-- Returns:
- a new view
ExtendedIterableof the currentIterableIntervalViewProviderwithout the last n elements
-
isEmpty
public final boolean isEmpty()The time complexity of this method is O(1).- Specified by:
isEmptyin interfaceEmptinessRequestable- Specified by:
isEmptyin interfaceIterableContainAnyRequestable- 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.- Specified by:
toin interfaceIterableMappedProvider<E>- Type Parameters:
T- the type of the elements the given mapper maps from the elements of the currentIterableMappedProvider- Parameters:
mapper-- Returns:
- a new
ExtendedIterablewith the elements the given mapper maps from the elements of the currentIterableMappedProvider
-
toArray
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements. The time complexity of this method is O(n) if the currentIterableArrayProvidercontains n elements.- Specified by:
toArrayin interfaceIterableArrayProvider<E>- Returns:
- a new array with the elements of the current
IterableArrayProvider
-
toByteArray
The time complexity of this method is O(n) if the currentIterableArrayProvidercontains n elements.- Specified by:
toByteArrayin interfaceIterableArrayProvider<E>- Parameters:
byteMapper-- Returns:
- a new array with the bytes the given byteMapper maps from the
elements of the current
IterableArrayProvider. Maps null elements to 0
-
toCharArray
The time complexity of this method is O(n) if the currentIterableArrayProvidercontains n elements.- Specified by:
toCharArrayin interfaceIterableArrayProvider<E>- Parameters:
charMapper-- Returns:
- a new array with the chars the given charMapper maps from the
elements of the current
IterableArrayProvider. Maps null elements to a space
-
toConcatenatedString
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
toConcatenatedStringin interfaceIterableStringProvider- Returns:
- a concatenation of the
Stringrepresentations of the elements of the currentIterableStringProvider.
-
toDoubleArray
The time complexity of this method is O(n) if the currentIterableArrayProvidercontains n elements.- Specified by:
toDoubleArrayin interfaceIterableArrayProvider<E>- Parameters:
doubleMapper-- Returns:
- a new array with the doubles the given doubleMapper maps from the
elements of the current
IterableArrayProvider. Maps null elements to 0.0
-
toIntArray
The time complexity of this method is O(n) if the currentIterableArrayProvidercontains n elements.- Specified by:
toIntArrayin interfaceIterableArrayProvider<E>- Parameters:
intMapper-- Returns:
- a new array with the ints the given intMapper maps from the elements
of the current
IterableArrayProvider. Maps null elements to 0. Maps null elements to 0
-
toLongArray
The time complexity of this method is O(n) if the currentIterableArrayProvidercontains n elements.- Specified by:
toLongArrayin interfaceIterableArrayProvider<E>- Parameters:
longMapper-- Returns:
- a new array with the longs the given longMapper maps from the
elements of the current
IterableArrayProvider. 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 interfaceIterableMappedProvider<E>- Type Parameters:
T- the type of the elements of theExtendedIterables the given multipleMapper maps from the elements of the currentIterableMappedProvider- Parameters:
multipleMapper-- Returns:
- a new
ExtendedIterablewith the elements of theExtendedIterables the given multipleMapper maps from the elements of the currentIterableMappedProvider
-
toNumbers
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
toNumbersin interfaceIterableMappedProvider<E>- Type Parameters:
N- the type of theNumbers the given numberMapper maps from the elements of the currentIterableMappedProvider- Parameters:
numberMapper-- Returns:
- a new
ExtendedIterablewith theNumbers the given numberMapper maps from the elements of the currentIterableMappedProvider. Maps null elements to 0.0
-
toOrdered
public final <C extends Comparable<C>> ExtendedIterable<E> toOrdered(Function<E, C> comparableMapper) The time complexity of this method is O(n*log(n)) if the currentIterableOrderProvidercontains n elements.- Specified by:
toOrderedin interfaceIterableOrderProvider<E>- Type Parameters:
C- the type of theComparables the given comparableMapper returns- Parameters:
comparableMapper-- Returns:
- a new
ExtendedIterablewith the elements of the currentIterableOrderProviderordered from the smallest to the biggest element according to theComparables the given comparableMapper maps from the elements of the currentIterableOrderProvider
-
toReversed
The time complexity of this method is O(n) if the currentIterableOrderProvidercontains n elements.- Specified by:
toReversedin interfaceIterableOrderProvider<E>- Returns:
- a new
ExtendedIterablewith the elements of the currentIterableOrderProviderin reversed order
-
toStringArray
The time complexity of this method is O(n) if the currentIterableArrayProvidercontains n elements.- Specified by:
toStringArrayin interfaceIterableArrayProvider<E>- Returns:
- a new array with the
Stringrepresentations of the elements of the currentIterableArrayProvider.
-
toStrings
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
toStringsin interfaceIterableMappedProvider<E>- Returns:
- a new
ExtendedIterablewith theStringrepresentations of the elements of the currentExtendedIterable
-
toStringWithDelimiter
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
toStringWithDelimiterin interfaceIterableStringProvider- Parameters:
delimiter-- Returns:
- a concatenation of the
Stringrepresentations of the elements of the currentIterableStringProviderwith the given separator in between.
-
toStringWithDelimiter
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
toStringWithDelimiterin interfaceIterableStringProvider- Parameters:
delimiter-- Returns:
- a concatenation of the
Stringrepresentations of the elements of the currentIterableStringProviderwith the given separator in between
-
toWithOneBasedIndex
The time complexity of this implementation is O(n) if the currentAbstractExtendedIterablecontains n elements.- Specified by:
toWithOneBasedIndexin interfaceIterableMappedProvider<E>- Type Parameters:
T- the type of the elements the given mapper maps from the elements of the currentIterableMappedProviderand 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 currentIterableMappedProviderand from the one-based index of these elements
-