Class MappingContainerView<E,T>

Type Parameters:
E - is the type of the elements of a MappingContainerView.
T - is the type of the elements a MappingContainerView maps 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>

public final class MappingContainerView<E,T> extends AbstractExtendedContainer<T>
Author:
Silvan Wyss
  • 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 created MappingContainerView.
      T2 - is the type of the elements the created MappingContainerView maps from its elements.
      Parameters:
      container -
      mapper -
      Returns:
      a new MappingContainerView with 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

      public T getStoredAtOneBasedIndex(int oneBasedIndex)
      Parameters:
      oneBasedIndex -
      Returns:
      the element at the given oneBasedIndex. The element can be null.
    • isMaterialized

      public boolean isMaterialized()
      Returns:
      true if the current MaterializationRequestable is materialized, false otherwise.
    • iterator

      public CopyableIterator<T> iterator()