Klasse IterableContainerView<E>

Typparameter:
E - is the type of the elements of a IterableContainerView.
Alle implementierten Schnittstellen:
Filterable<E>, Groupable<E>, IContainer<E>, IFilteringContainerViewProvider<E>, IIntervallContainerViewProvider<E>, IMappingContainerViewProvider<E>, Mappable<E>, AggregationRequestable<E>, ArrayMappable<E>, CountRequestable<E>, IndexRequestable<E>, IterableWithCopyableIterator<E>, SingleSearchable<E>, StoringRequestable<E>, StringMappable, EmptinessRequestable, MaterializationRequestable, Iterable<E>

public final class IterableContainerView<E> extends AbstractExtendedContainer<E>
Version:
2017-11-26
Autor:
Silvan Wyss
  • Konstruktordetails

    • IterableContainerView

      public IterableContainerView()
      Creates a new IterableContainerView for a new empty container.
  • Methodendetails

    • forIterable

      public static <E2> IterableContainerView<E2> forIterable(Iterable<? extends E2> iterable)
      Typparameter:
      E2 - is the type of the elements of the given iterable.
      Parameter:
      iterable -
      Gibt zurück:
      a new IterableContainerView for the given iterable.
      Löst aus:
      ArgumentIsNullException - if the given iterable is null.
    • getCount

      public int getCount()
      Gibt zurück:
      the number of elements of the current CountRequestable.
    • getStoredAtOneBasedIndex

      public E getStoredAtOneBasedIndex(int oneBasedIndex)
      Parameter:
      oneBasedIndex -
      Gibt zurück:
      the element at the given oneBasedIndex. The element can be null.
    • isMaterialized

      public boolean isMaterialized()
      Gibt zurück:
      true if the current MaterializationRequestable is materialized, false otherwise.
    • iterator

      public CopyableIterator<E> iterator()
    • toString

      public String toString()
      The time complexity of this implementation is O(n). if the current IterableContainerView contains n elements.
      Setzt außer Kraft:
      toString in Klasse Object
      Gibt zurück:
      a String representation of the current IterableContainerView.