Klasse ArrayView<E>

java.lang.Object
ch.nolix.core.container.base.Container<E>
ch.nolix.core.container.containerview.ArrayView<E>
Typparameter:
E - is the type of the elements of a ArrayView.
Alle implementierten Schnittstellen:
IContainer<E>, IViewProviderContainer<E>, Mappable<E>, MultiSearchable<E>, ArrayMappable<E>, ICountingContainer<E>, IndexRequestable<E>, IStatisticalConainer<E>, IterableWithCopyableIterator<E>, SingleSearchable<E>, StoringRequestable<E>, StringMappable, EmptinessRequestable, MaterializationRequestable, Iterable<E>

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

    • ArrayView

      public ArrayView()
      Creates a new ArrayView for a new empty array.
  • Methodendetails

    • forArray

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

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

      public E getStoredAt1BasedIndex(int param1BasedIndex)
      Parameter:
      param1BasedIndex -
      Gibt zurück:
      the element at the given param1BasedIndex. 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()
    • toOrderedList

      public <C extends Comparable<C>> IContainer<E> toOrderedList(Function<E,C> norm)
      Typparameter:
      C - is the type of the Comparables the given comparableMapper returns.
      Parameter:
      norm -
      Gibt zurück:
      a new IContainer with the elements of the current IContainer ordered from the smallest to the biggest element according to the Comparables the given comparableMapper maps from the elements of the current IContainer.
    • toString

      public String toString()
      Setzt außer Kraft:
      toString in Klasse Object
      Gibt zurück:
      a String representation of the current ArrayView.
    • createEmptyMutableList

      protected <E2> ILinkedList<E2> createEmptyMutableList(Marker<E2> marker)
      Angegeben von:
      createEmptyMutableList in Klasse Container<E>
      Typparameter:
      E2 - is the type of the elements the created ILinkedList can contain.
      Parameter:
      marker -
      Gibt zurück:
      a new empty ILinkedList.