Schnittstelle IContainer<E>

Typparameter:
E - is the type of the elements a IContainer.
Alle Superschnittstellen:
EmptinessRequestable, IMappableContainer<E>, ISearchableContainer<E>, IStatisticalConainer<E>, Iterable<E>, IterableWithCopyableIterator<E>, MaterializationRequestable, StoringRequestable<E>
Alle bekannten Unterschnittstellen:
IArrayList<E>, ICachingContainer<E>, ILinkedList<E>, IMatrix<E>
Alle bekannten Implementierungsklassen:
ArrayList, ArrayReadContainer, CachingContainer, CompressedList, Container, GapMatrix, ImmutableList, IterableReadContainer, LinkedList, Matrix, MatrixColumn, MatrixRow, MultiReadContainer, ReadContainer

A IContainer can store several elements of a certain type. A IContainer stores its element in a linear order. There can exists additionally other orders. A IContainer is iterable.
Version:
2016-01-01
Autor:
Silvan Wyss
  • Methodendetails

    • from1BasedStartIndex

      IContainer<E> from1BasedStartIndex(int p1BasedStartIndex)
      Parameter:
      p1BasedStartIndex -
      Gibt zurück:
      a new sub IContainer of the current IContainer from the given p1BasedStartIndex.
      Löst aus:
      RuntimeException - if the given p1BasedStartIndex is not positive.
      RuntimeException - if the current IContainer contains less elements than the given p1BasedStartIndex.
    • from1BasedStartIndexUntil1BasedEndIndex

      IContainer<E> from1BasedStartIndexUntil1BasedEndIndex(int p1BasedStartIndex, int p1BasedEndIndex)
      Parameter:
      p1BasedStartIndex -
      p1BasedEndIndex -
      Gibt zurück:
      a new sub IContainer of the current IContainer from the given p1BasedStartIndex to the given p1BasedEndIndex.
      Löst aus:
      RuntimeException - if the given startIndex is not positive.
      RuntimeException - if the given p1BasedEndIndex is smaller than the given p1BasedStartIndex.
      RuntimeException - if the given p1BasedEndIndex is bigger than the number of elements of the current IContainer.
    • get1BasedIndexOfFirst

      int get1BasedIndexOfFirst(Predicate<E> selector)
      Parameter:
      selector -
      Gibt zurück:
      the 1 based index of the first element the given selector selects from the current IContainer.
      Löst aus:
      RuntimeException - if the current IContainer does not contain an element the given selector selects.
    • get1BasedIndexOfFirstEqualElement

      int get1BasedIndexOfFirstEqualElement(E element)
      Parameter:
      element -
      Gibt zurück:
      the 1-based index of the first element of the current IContainer that equals the given element.
      Löst aus:
      RuntimeException - if the current IContainer does not contain an element that equals the given element.
    • get1BasedIndexOfFirstOccuranceOf

      int get1BasedIndexOfFirstOccuranceOf(E element)
      Parameter:
      element -
      Gibt zurück:
      the 1-based index of the given element in the current IContainer.
      Löst aus:
      RuntimeException - if the current IContainer does not contain the given element.
    • toOrderedList

      <C extends Comparable<C>> IContainer<E> toOrderedList(Function<E,C> norm)
      Typparameter:
      C - is the type of the Comparables the given norm 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 given norm.
    • toReversedList

      IContainer<E> toReversedList()
      Gibt zurück:
      a new IContainer with the elements of the current IContainer in the reversed order.
    • toStringArray

      String[] toStringArray()
      Gibt zurück:
      a new array with the Strings that represent the elements of the current IContainer.
    • toStrings

      IContainer<String> toStrings()
      Gibt zurück:
      a new IContainer with the String representations of the elements of the current IContainer.
    • toStringWithSeparator

      String toStringWithSeparator(char separator)
      Parameter:
      separator -
      Gibt zurück:
      a String representation the current IContainer with the given separator.
    • toStringWithSeparator

      String toStringWithSeparator(String separator)
      Parameter:
      separator -
      Gibt zurück:
      a String representation of the current IContainer with the given separator.
      Löst aus:
      RuntimeException - if the given separator is null.
    • until1BasedIndex

      IContainer<E> until1BasedIndex(int p1BasedEndIndex)
      Parameter:
      p1BasedEndIndex -
      Gibt zurück:
      a new sub IContainer of the current IContainer with the elements to the given p1BasedEndIndex.
      Löst aus:
      RuntimeException - if the given p1BasedEndIndex is not positive.
      RuntimeException - if the current IContainer contains more elements than the given p1BasedEndIndex.
    • withoutFirst

      IContainer<E> withoutFirst()
      Gibt zurück:
      a new sub IContainer of the current IContainer without the first element.
      Löst aus:
      RuntimeException - if the current IContainer is empty.
    • withoutFirst

      IContainer<E> withoutFirst(int n)
      Parameter:
      n -
      Gibt zurück:
      a new sub IContainer of the current IContainer without the first n elements.
      Löst aus:
      RuntimeException - if the given n is not positive.
      RuntimeException - if the current IContainer contains less than n elements.
    • withoutLast

      IContainer<E> withoutLast()
      Gibt zurück:
      a new sub IContainer of the current IContainer without the last element.
      Löst aus:
      RuntimeException - if the current IContainer is empty.
    • withoutLast

      IContainer<E> withoutLast(int n)
      Parameter:
      n -
      Gibt zurück:
      a new sub IContainer of the current IContainer without the last n elements of the current IContainer.
      Löst aus:
      RuntimeException - if the given n is not positive.
      RuntimeException - if the current IContainer contains less than n elements.