Klasse ReadContainer<E>
java.lang.Object
ch.nolix.core.container.base.Container<E>
ch.nolix.core.container.readcontainer.ReadContainer<E>
- Typparameter:
E
- is the type of the elements of aReadContainer
.
- Alle implementierten Schnittstellen:
IContainer<E>
,IMappableContainer<E>
,ISearchableContainer<E>
,IStatisticalConainer<E>
,IterableWithCopyableIterator<E>
,IViewProviderContainer<E>
,StoringRequestable<E>
,EmptinessRequestable
,MaterializationRequestable
,Iterable<E>
A
ReadContainer
can read a given Iterable
or array. A
ReadContainer
prevents that its accessed Iterable
or array
can be mutated. A ReadContainer
does not prevent that the elements of
its Iterable
or array can be mutated.- Version:
- 2017-07-01
- Autor:
- Silvan Wyss
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungprotected <E2> ILinkedList
<E2> createEmptyMutableList
(Marker<E2> marker) boolean
An object equals aReadContainer
when the object is aIterable
that contains exactly the same elements in the same order like theReadContainer
.static <E2> ReadContainer
<E2> forArray
(E2[] array, E2[]... arrays) static <E2> ReadContainer
<E2> forElementAndArray
(E2 element, E2[] array) static <E2> ReadContainer
<E2> forEmpty()
static <E2> ReadContainer
<E2> forIterable
(Iterable<? extends E2> iterable, Iterable<? extends E2>... iterables) int
getCount()
getStoredAt1BasedIndex
(int param1BasedIndex) int
hashCode()
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, containsAny, containsAnyOf, containsAnyOf, containsAsManyAs, containsEqualing, containsExactlyEqualingInSameOrder, containsExactlyInSameOrder, containsLessThan, containsMoreThan, containsNone, containsNone, containsNoneOf, containsOnce, containsOne, containsOne, containsOneEqualing, containsOnly, get1BasedIndexOfFirst, get1BasedIndexOfFirstEqualElement, get1BasedIndexOfFirstOccuranceOf, getAverage, getAverageOrZero, getCount, getCount, getMax, getMaxOrZero, getMedian, getMedianOrZero, getMin, getMinOrZero, getOptionalStoredFirst, getOptionalStoredFirst, getStandardDeviation, getStoredAny, getStoredByMax, getStoredByMin, getStoredFirst, getStoredFirst, getStoredGroups, getStoredOfType, getStoredOne, getStoredOne, getStoredOther, getStoredSelected, getSum, getSumOfIntegers, getVariance, getViewFrom1BasedStartIndex, getViewFrom1BasedStartIndexTo1BasedEndIndex, getViewTo1BasedEndIndex, getViewWithoutFirst, getViewWithoutFirst, getViewWithoutLast, getViewWithoutLast, isEmpty, to, toArray, toByteArray, toCharArray, toConcatenatedString, toDoubleArray, toFromGroups, toIntArray, toLongArray, toReversedList, toStringArray, toStrings, toStringWithSeparator, toStringWithSeparator
Von Klasse geerbte Methoden java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Von Schnittstelle geerbte Methoden java.lang.Iterable
forEach, spliterator
Von Schnittstelle geerbte Methoden ch.nolix.coreapi.stateapi.staterequestapi.MaterializationRequestable
isView
-
Methodendetails
-
forArray
- Typparameter:
E2
- is the type of the elements of the given array and arrays.- Parameter:
array
-arrays
-- Gibt zurück:
- a new
ReadContainer
for the given array and arrays. - Löst aus:
ArgumentIsNullException
- if the given array is null.ArgumentIsNullException
- if the given arrays is null.ArgumentIsNullException
- if one array of the given arrays is null.
-
forElementAndArray
- Typparameter:
E2
- is the type of the given element and elements of the given array.- Parameter:
element
-array
-- Gibt zurück:
- a new
ReadContainer
for the given element and array. - Löst aus:
ArgumentIsNullException
- if the given element is null.ArgumentIsNullException
- if the given array is null.ArgumentIsNullException
- if one element of the given arrays is null.
-
forEmpty
- Typparameter:
E2
- is the type of the hypothetical elements of the created emptyReadContainer
.- Gibt zurück:
- a new empty
ReadContainer
.
-
forIterable
@SafeVarargs public static <E2> ReadContainer<E2> forIterable(Iterable<? extends E2> iterable, Iterable<? extends E2>... iterables) - Typparameter:
E2
- is the type of the elements of the given iterable and iterables.- Parameter:
iterable
-iterables
-- Gibt zurück:
- a new
ReadContainer
for the given iterable and iterables. - Löst aus:
ArgumentIsNullException
- if the given iterable is null.ArgumentIsNullException
- if the given iterables is null.ArgumentIsNullException
- if one of the given iterables is null.
-
equals
An object equals aReadContainer
when the object is aIterable
that contains exactly the same elements in the same order like theReadContainer
. -
getCount
public int getCount()- Gibt zurück:
- the number of elements of the current
IStatisticalConainer
.
-
getStoredAt1BasedIndex
- Parameter:
param1BasedIndex
-- Gibt zurück:
- the element at the given p1BasedIndex.
-
getStoredLast
- Gibt zurück:
- the last element of the current
ISearchableContainer
.
-
hashCode
public int hashCode() -
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 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.
-
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
.
-