Klasse ContainerView<E>

Typparameter:
E - is the type of the elements of a ContainerView.
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 ContainerView<E> extends AbstractExtendedContainer<E>
A ContainerView wraps one or several given Iterables or arrays. A ContainerView prevents that its accessed Iterables or arrays are mutated. A ContainerView does not prevent that the elements of its Iterable or array are mutated.
Autor:
Silvan Wyss
  • Methodendetails

    • createEmpty

      public static <T> ContainerView<T> createEmpty()
      Typparameter:
      T - is the types the elements the ContainerView would have.
      Gibt zurück:
      an empty ContainerView.
    • forArray

      public static <T> ContainerView<T> forArray(T[] array)
      Typparameter:
      T - is the type of the elements of the given array.
      Parameter:
      array -
      Gibt zurück:
      a new ContainerView for the given array.
      Löst aus:
      ArgumentIsNullException - if the given array is null.
    • forArrays

      @SafeVarargs public static <T> ContainerView<T> forArrays(T[]... arrays)
      Typparameter:
      T - is the type of the elements of the given arrays.
      Parameter:
      arrays -
      Gibt zurück:
      a new ContainerView for the given arrays.
      Löst aus:
      ArgumentIsNullException - if the given arrays is null.
      ArgumentIsNullException - if one of the given arrays is null.
    • forElementAndArray

      public static <T> ContainerView<T> forElementAndArray(T element, T[] array)
      Typparameter:
      T - is the type of the given element and the elements of the given array.
      Parameter:
      element -
      array -
      Gibt zurück:
      a new ContainerView for the given element and array.
      Löst aus:
      ArgumentIsNullException - if the given array is null.
    • forIterable

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

      public static <T> ContainerView<T> forIterableAndElement(Iterable<T> iterable, T element)
      Typparameter:
      T - is the type of the elements of the given iterable and element.
      Parameter:
      iterable -
      element -
      Gibt zurück:
      a new ContainerView for the given iterable and element.
      Löst aus:
      ArgumentIsNullException - if the given iterable is null.
    • forIterables

      @SafeVarargs public static <T> ContainerView<T> forIterables(Iterable<? extends T>... iterables)
      Typparameter:
      T - is the type of the elements of the given iterables.
      Parameter:
      iterables -
      Gibt zurück:
      a new ContainerView for the given iterables.
      Löst aus:
      ArgumentIsNullException - if the given iterables is null.
      ArgumentIsNullException - if one of the given iterables is null.
    • equals

      public boolean equals(Object object)
      A Object equals a ContainerView when the object is a Iterable that contains exactly the same elements in the same order as the ContainerView.
      Setzt außer Kraft:
      equals in Klasse Object
    • 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.
    • hashCode

      public int hashCode()
      Setzt außer Kraft:
      hashCode in Klasse Object
    • 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()
      Setzt außer Kraft:
      toString in Klasse Object