Schnittstelle IContainer<E>
- Typparameter:
E
- is the type of the elements aIContainer
.
- 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
public interface IContainer<E>
extends EmptinessRequestable, IterableWithCopyableIterator<E>, ISearchableContainer<E>, IMappableContainer<E>, MaterializationRequestable, IStatisticalConainer<E>, StoringRequestable<E>
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
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungfrom1BasedStartIndex
(int p1BasedStartIndex) from1BasedStartIndexUntil1BasedEndIndex
(int p1BasedStartIndex, int p1BasedEndIndex) int
get1BasedIndexOfFirst
(Predicate<E> selector) int
get1BasedIndexOfFirstEqualElement
(E element) int
get1BasedIndexOfFirstOccuranceOf
(E element) <C extends Comparable<C>>
IContainer<E> toOrderedList
(Function<E, C> norm) String[]
toStringWithSeparator
(char separator) toStringWithSeparator
(String separator) until1BasedIndex
(int p1BasedEndIndex) withoutFirst
(int n) withoutLast
(int n) Von Schnittstelle geerbte Methoden ch.nolix.coreapi.stateapi.staterequestapi.EmptinessRequestable
containsAny, isEmpty
Von Schnittstelle geerbte Methoden ch.nolix.coreapi.containerapi.baseapi.IMappableContainer
to, toArray, toByteArray, toCharArray, toConcatenatedString, toDoubleArray, toFromGroups, toIntArray, toLongArray
Von Schnittstelle geerbte Methoden ch.nolix.coreapi.containerapi.baseapi.ISearchableContainer
getOptionalStoredFirst, getOptionalStoredFirst, getStoredAny, getStoredAt1BasedIndex, getStoredByMax, getStoredByMin, getStoredFirst, getStoredFirst, getStoredGroups, getStoredLast, getStoredOfType, getStoredOne, getStoredOne, getStoredOther, getStoredSelected
Von Schnittstelle geerbte Methoden ch.nolix.coreapi.containerapi.baseapi.IStatisticalConainer
getAverage, getAverageOrZero, getCount, getCount, getCount, getMax, getMaxOrZero, getMedian, getMedianOrZero, getMin, getMinOrZero, getStandardDeviation, getSum, getSumOfIntegers, getVariance
Von Schnittstelle geerbte Methoden java.lang.Iterable
forEach, spliterator
Von Schnittstelle geerbte Methoden ch.nolix.coreapi.containerapi.baseapi.IterableWithCopyableIterator
iterator
Von Schnittstelle geerbte Methoden ch.nolix.coreapi.stateapi.staterequestapi.MaterializationRequestable
isMaterialized, isView
Von Schnittstelle geerbte Methoden ch.nolix.coreapi.containerapi.baseapi.StoringRequestable
contains, containsAll, containsAll, containsAny, containsAny, containsAnyOf, containsAsManyAs, containsEqualing, containsExactlyInSameOrder, containsLessThan, containsMoreThan, containsNone, containsNone, containsNoneOf, containsOnce, containsOne, containsOne, containsOneEqualing, containsOnly, containsOnlyEqualingAndViceVersa
-
Methodendetails
-
from1BasedStartIndex
- Parameter:
p1BasedStartIndex
-- Gibt zurück:
- a new sub
IContainer
of the currentIContainer
from the given p1BasedStartIndex. - Löst aus:
RuntimeException
- if the given p1BasedStartIndex is not positive.RuntimeException
- if the currentIContainer
contains less elements than the given p1BasedStartIndex.
-
from1BasedStartIndexUntil1BasedEndIndex
- Parameter:
p1BasedStartIndex
-p1BasedEndIndex
-- Gibt zurück:
- a new sub
IContainer
of the currentIContainer
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 currentIContainer
.
-
get1BasedIndexOfFirst
- 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 currentIContainer
does not contain an element the given selector selects.
-
get1BasedIndexOfFirstEqualElement
- 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 currentIContainer
does not contain an element that equals the given element.
-
get1BasedIndexOfFirstOccuranceOf
- Parameter:
element
-- Gibt zurück:
- the 1-based index of the given element in the current
IContainer
. - Löst aus:
RuntimeException
- if the currentIContainer
does not contain the given element.
-
toOrderedList
- Typparameter:
C
- is the type of theComparable
s the given norm returns.- Parameter:
norm
-- Gibt zurück:
- a new
IContainer
with the elements of the currentIContainer
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 currentIContainer
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 theString
representations of the elements of the currentIContainer
.
-
toStringWithSeparator
- Parameter:
separator
-- Gibt zurück:
- a
String
representation the currentIContainer
with the given separator.
-
toStringWithSeparator
- Parameter:
separator
-- Gibt zurück:
- a
String
representation of the currentIContainer
with the given separator. - Löst aus:
RuntimeException
- if the given separator is null.
-
until1BasedIndex
- Parameter:
p1BasedEndIndex
-- Gibt zurück:
- a new sub
IContainer
of the currentIContainer
with the elements to the given p1BasedEndIndex. - Löst aus:
RuntimeException
- if the given p1BasedEndIndex is not positive.RuntimeException
- if the currentIContainer
contains more elements than the given p1BasedEndIndex.
-
withoutFirst
IContainer<E> withoutFirst()- Gibt zurück:
- a new sub
IContainer
of the currentIContainer
without the first element. - Löst aus:
RuntimeException
- if the currentIContainer
is empty.
-
withoutFirst
- Parameter:
n
-- Gibt zurück:
- a new sub
IContainer
of the currentIContainer
without the first n elements. - Löst aus:
RuntimeException
- if the given n is not positive.RuntimeException
- if the currentIContainer
contains less than n elements.
-
withoutLast
IContainer<E> withoutLast()- Gibt zurück:
- a new sub
IContainer
of the currentIContainer
without the last element. - Löst aus:
RuntimeException
- if the currentIContainer
is empty.
-
withoutLast
- Parameter:
n
-- Gibt zurück:
- a new sub
IContainer
of the currentIContainer
without the last n elements of the currentIContainer
. - Löst aus:
RuntimeException
- if the given n is not positive.RuntimeException
- if the currentIContainer
contains less than n elements.
-