Class ExtendedIterableMapperView<E,T>
java.lang.Object
ch.nolix.base.datastructure.extendediterable.AbstractExtendedIterable<T>
ch.nolix.base.datastructure.extendediterable.ExtendedIterableMapperView<E,T>
- Type Parameters:
E- the type of the elements of aExtendedIterableMapperViewT- the type of the elements aExtendedIterableMapperViewmaps from its elements
- All Implemented Interfaces:
IterableWithCopyableIterator<T>, ExtendedIterable<T>, IterableFilterProvider<T>, IterableFilterViewProvider<T>, IterableGroupProvider<T>, IterableIntervalViewProvider<T>, IterableMappedProvider<T>, IterableMappedViewProvider<T>, IterableOrderProvider<T>, IterableArrayProvider<T>, IterableByExtremumProvider<T>, IterableByIndexProvider<T>, IterableFirstProvider<T>, IterableLastProvider<T>, IterableStringProvider, IterableContainAnyRequestable, IterableContainEqualRequestable<T>, IterableContainMatchingRequestable<T>, IterableContainMultipleRequestable, IterableContainObjectRequestable, IterableOneBasedIndexRequestable<T>, AggregationRequestable<T>, BaseCountRequestable, CountRequestable<T>, SingleProvider<T>, EmptinessRequestable, MaterializationRequestable, Iterable<T>
- Author:
- Silvan Wyss
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T,T2> ExtendedIterableMapperView <T, T2> forContainerAndMapperAndArrayListCreator(AbstractExtendedIterable<T> container, Function<T, T2> mapper, ArrayListCreator arrayListCreator) intgetCount()getStoredAtOneBasedIndex(int oneBasedIndex) booleaniterator()Methods inherited from class AbstractExtendedIterable
contains, containsAll, containsAll, containsAny, containsAny, containsAny, containsEqual, containsExactlyAllEqualInSameOrder, containsExactlyInSameOrder, containsMatching, containsMatchingOnly, containsNoEqual, containsNoMatching, containsNone, containsNone, containsNonNull, containsOnce, containsOne, containsOneEqual, containsOneMatching, containsOneNoneNull, containsOnly, getAverage, getAverageOrZero, getCount, getCountOf, getMax, getMaxOrZero, getMedian, getMedianOrZero, getMin, getMinOrZero, getOneBasedIndexOfFirst, getOneBasedIndexOfFirstEqualElement, getOneBasedIndexOfFirstOccurrenceOf, getOptionalStoredFirst, getOptionalStoredFirst, getStandardDeviation, getStoredByMax, getStoredByMin, getStoredFirst, getStoredFirst, getStoredFirstNonNull, getStoredFirstOfType, getStoredInGroups, getStoredLast, getStoredOfType, getStoredOthers, getStoredSelected, getStoredSingle, getStoredSingle, getSum, getSumOfInts, getVariance, getViewFromOneBasedStartIndex, getViewFromOneBasedStartIndexToOneBasedEndIndex, getViewOf, getViewOfStoredSelected, getViewToOneBasedEndIndex, getViewWithoutFirst, getViewWithoutFirst, getViewWithoutLast, getViewWithoutLast, isEmpty, to, toArray, toByteArray, toCharArray, toConcatenatedString, toDoubleArray, toIntArray, toLongArray, toMultiples, toNumbers, toOrdered, toReversed, toStringArray, toStrings, toStringWithDelimiter, toStringWithDelimiter, toWithOneBasedIndexMethods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterable
forEach, spliteratorMethods inherited from interface MaterializationRequestable
isView
-
Method Details
-
forContainerAndMapperAndArrayListCreator
public static <T,T2> ExtendedIterableMapperView<T,T2> forContainerAndMapperAndArrayListCreator(AbstractExtendedIterable<T> container, Function<T, T2> mapper, ArrayListCreator arrayListCreator) - Type Parameters:
T- the type of the elements of the createdExtendedIterableMapperViewT2- the type of the elements the createdExtendedIterableMapperViewmaps from its elements- Parameters:
container-mapper-arrayListCreator-- Returns:
- a new
ExtendedIterableMapperViewfor the given container and with the given mapper and arrayListCreator - Throws:
RuntimeException- if the given container is nullRuntimeException- if the given mapper is nullRuntimeException- if the given arrayListCreator is null
-
getCount
public int getCount()- Returns:
- the number of elements of the current
BaseCountRequestable
-
getStoredAtOneBasedIndex
- Parameters:
oneBasedIndex-- Returns:
- the element at the given oneBasedIndex from the current
IterableByIndexProvider
-
isMaterialized
public boolean isMaterialized()- Returns:
- true if the current
MaterializationRequestableis materialized, false otherwise
-
iterator
-