Package ch.nolix.core.container.base
Klasse ContainerView<E>
java.lang.Object
ch.nolix.core.container.base.Container<E>
ch.nolix.core.container.base.ContainerView<E>
- Typparameter:
E
- is the type of the elements of aContainerView
.
- 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>
A
ContainerView
can iterate over a part of another container.
A ContainerView
must not use the methods of the accessed container
except the iterator method. The reason is that the accessed container can be
a specialized container that does not use its iterator in any of its declared
or overwritten method.- Version:
- 2017-08-27
- Autor:
- Silvan Wyss
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungprotected <E2> ILinkedList
<E2> createEmptyMutableList
(Marker<E2> marker) static <E2> ContainerView
<E2> forContainerAndStartIndexAndEndIndex
(Container<E2> container, int startIndex, int endIndex) int
getCount()
getStoredAt1BasedIndex
(int param1BasedIndex) boolean
iterator()
<C extends Comparable<C>>
IContainer<E> toOrderedList
(Function<E, C> norm) toString()
Von Klasse geerbte Methoden ch.nolix.core.container.base.Container
contains, containsAll, containsAll, containsAll, containsAny, containsAny, containsAnyOf, containsAnyOf, containsAsManyAs, containsEqualing, containsExactlyEqualingInSameOrder, containsExactlyInSameOrder, containsLessThan, containsMoreThan, containsNone, containsNone, containsNoneOf, containsOnce, containsOne, containsOne, containsOneEqualing, containsOnly, get1BasedIndexOfFirst, get1BasedIndexOfFirstEqualElement, get1BasedIndexOfFirstOccurrenceOf, getAverage, getAverageOrZero, getCount, getCountOf, getMax, getMaxOrZero, getMedian, getMedianOrZero, getMin, getMinOrZero, getOptionalStoredFirst, getOptionalStoredFirst, getStandardDeviation, getStoredByMax, getStoredByMin, getStoredFirst, getStoredFirst, getStoredFirstOfType, getStoredInGroups, getStoredLast, getStoredOfType, getStoredOne, getStoredOne, getStoredOthers, getStoredSelected, getSum, getSumOfInts, getVariance, getViewFrom1BasedStartIndex, getViewFrom1BasedStartIndexTo1BasedEndIndex, getViewTo1BasedEndIndex, getViewWithoutFirst, getViewWithoutFirst, getViewWithoutLast, getViewWithoutLast, isEmpty, to, toArray, toByteArray, toCharArray, toConcatenatedString, toDoubleArray, toIntArray, toLongArray, toMultiple, toNumbers, toReversedList, toStringArray, toStrings, toStringWithSeparator, toStringWithSeparator
Von Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Von Schnittstelle geerbte Methoden ch.nolix.coreapi.stateapi.staterequestapi.EmptinessRequestable
containsAny
Von Schnittstelle geerbte Methoden java.lang.Iterable
forEach, spliterator
Von Schnittstelle geerbte Methoden ch.nolix.coreapi.stateapi.staterequestapi.MaterializationRequestable
isView
-
Methodendetails
-
forContainerAndStartIndexAndEndIndex
public static <E2> ContainerView<E2> forContainerAndStartIndexAndEndIndex(Container<E2> container, int startIndex, int endIndex) - Typparameter:
E2
- is the type of the elements of the createdContainerView
.- Parameter:
container
-startIndex
-endIndex
-- Gibt zurück:
- a new
ContainerView
with the given container, startIndex and endIndex. - Löst aus:
ArgumentIsNullException
- if the given container is null.NonPositiveArgumentException
- if the given startIndex is not positive.NonPositiveArgumentException
- if the given endIndex is not positive.SmallerArgumentException
- if the given endIndex is smaller than the given startIndex.BiggerArgumentException
- if the given endIndex is bigger than the number of elements of the given container.
-
getCount
public int getCount()- Gibt zurück:
- the number of elements of the current
ICountingContainer
.
-
getStoredAt1BasedIndex
- 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
-
toOrderedList
- Typparameter:
C
- is the type of theComparable
s the given comparableMapper 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 theComparable
s the given comparableMapper maps from the elements of the currentIContainer
.
-
toString
-
createEmptyMutableList
- Angegeben von:
createEmptyMutableList
in KlasseContainer<E>
- Typparameter:
E2
- is the type of the elements the createdILinkedList
can contain.- Parameter:
marker
-- Gibt zurück:
- a new empty
ILinkedList
.
-