Class ExtendedIterableFilterView<E>

java.lang.Object
ch.nolix.base.datastructure.extendediterable.AbstractExtendedIterable<E>
ch.nolix.base.datastructure.extendediterablefilterview.ExtendedIterableFilterView<E>
Type Parameters:
E - the type of the elements of a ExtendedIterableFilterView.
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>

public final class ExtendedIterableFilterView<E> extends AbstractExtendedIterable<E>
Author:
Silvan Wyss
  • Method Details

    • forContainerAndSelector

      public static <T> ExtendedIterableFilterView<T> forContainerAndSelector(ExtendedIterable<T> container, Predicate<T> selector)
      Type Parameters:
      T - is the type of the elements of the given container.
      Parameters:
      container -
      selector -
      Returns:
      a new ExtendedIterableFilterView for the given container and selector.
      Throws:
      RuntimeException - if the given container is null
      RuntimeException - if the given selector is null.
    • forArrayAndSelector

      public static <T> ExtendedIterableFilterView<T> forArrayAndSelector(T[] array, Predicate<T> selector)
      Type Parameters:
      T - is the type of the given element and elements of the given array.
      Parameters:
      array -
      selector -
      Returns:
      a new ExtendedIterableFilterView for the given element and array.
      Throws:
      RuntimeException - if the given array is null
      RuntimeException - if the given selector is null.
    • getCount

      public int getCount()
      Returns:
      the number of elements of the current CountRequestable.
    • getStoredAtOneBasedIndex

      public E 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<E> iterator()
    • toString

      public String toString()
      Overrides:
      toString in class Object