Class MappingContainerView<E,T>
java.lang.Object
ch.nolix.base.container.base.AbstractContainer<T>
ch.nolix.base.container.arraylist.AbstractExtendedContainer<T>
ch.nolix.base.container.arraylist.MappingContainerView<E,T>
- Type Parameters:
E- is the type of the elements of aMappingContainerView.T- is the type of the elements aMappingContainerViewmaps from its elements.
- All Implemented Interfaces:
Filterable<T>, Groupable<T>, IContainer<T>, IFilteringContainerViewProvider<T>, IIntervallContainerViewProvider<T>, IMappingContainerViewProvider<T>, Mappable<T>, AggregationRequestable<T>, ArrayMappable<T>, CountRequestable<T>, IndexRequestable<T>, IterableWithCopyableIterator<T>, SingleSearchable<T>, StoringRequestable<T>, StringMappable, EmptinessRequestable, MaterializationRequestable, Iterable<T>
- Author:
- Silvan Wyss
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T,T2> MappingContainerView <T, T2> forContainerAndMapper(AbstractContainer<T> container, Function<T, T2> mapper) intgetCount()getStoredAtOneBasedIndex(int oneBasedIndex) booleaniterator()Methods inherited from class AbstractExtendedContainer
getViewFromOneBasedStartIndexToOneBasedEndIndex, getViewOf, getViewOfStoredSelected, toOrderedListMethods 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 EmptinessRequestable
containsAnyMethods inherited from interface Iterable
forEach, spliteratorMethods inherited from interface MaterializationRequestable
isView
-
Method Details
-
forContainerAndMapper
public static <T,T2> MappingContainerView<T,T2> forContainerAndMapper(AbstractContainer<T> container, Function<T, T2> mapper) - Type Parameters:
T- is the type of the elements of the createdMappingContainerView.T2- is the type of the elements the createdMappingContainerViewmaps from its elements.- Parameters:
container-mapper-- Returns:
- a new
MappingContainerViewwith the given container and mapper. - Throws:
RuntimeException- if the given container is null.RuntimeException- if the given mapper is null.
-
getCount
public int getCount()- Returns:
- the number of elements of the current
CountRequestable.
-
getStoredAtOneBasedIndex
- Parameters:
oneBasedIndex-- Returns:
- the element at the given oneBasedIndex. The element can be null.
-
isMaterialized
public boolean isMaterialized()- Returns:
- true if the current
MaterializationRequestableis materialized, false otherwise.
-
iterator
-