Klasse ImmutableList<E>

Typparameter:
E - is the type of the elements of a ImmutableList.
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 ImmutableList<E> extends AbstractExtendedContainer<E>
A ImmutableList is not mutable.
Autor:
Silvan Wyss
  • Methodendetails

    • createEmpty

      public static <T> ImmutableList<T> createEmpty()
      Typparameter:
      T - is the type of the elements the ImmutableList would have.
      Gibt zurück:
      a new empty ImmutableList.
    • fromArray

      public static <T> ImmutableList<T> fromArray(T[] array)
    • fromIterable

      public static <T> ImmutableList<T> fromIterable(Iterable<T> iterable)
      Typparameter:
      T -
      Parameter:
      iterable -
      Gibt zurück:
      a new ImmutableList with the elements of the given iterable.
      Löst aus:
      ArgumentIsNullException - if the given iterable is null.
      ArgumentIsNullException - if one of the elements of the given iterable is null.
    • fromStream

      public static <T> ImmutableList<T> fromStream(Stream<T> stream)
      Typparameter:
      T - is the type of the elements of the given stream.
      Parameter:
      stream -
      Gibt zurück:
      a new ImmutableList with the elements from the given stream.
      Löst aus:
      ArgumentIsNullException - if the given stream is null.
      ArgumentIsNullException - if one of the elements of the given stream is null.
    • withElement

      public static <T> ImmutableList<T> withElement(T element)
      Typparameter:
      T - is the type of the given element.
      Parameter:
      element -
      Gibt zurück:
      a new ImmutableList with the given element.
      Löst aus:
      ArgumentIsNullException - if the given element is null.
    • withElements

      @SafeVarargs public static <T> ImmutableList<T> withElements(T... elements)
      Typparameter:
      T - is the type of the given elements.
      Parameter:
      elements -
      Gibt zurück:
      a new ImmutableList with the given elements.
      Löst aus:
      ArgumentIsNullException - if the given elements is null.
      ArgumentIsNullException - if one of the given elements 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()
      Setzt außer Kraft:
      toString in Klasse Object