Klasse ContainerView<E>
java.lang.Object
ch.nolix.core.container.base.AbstractContainer<E>
ch.nolix.core.container.arraylist.AbstractExtendedContainer<E>
ch.nolix.core.container.containerview.ContainerView<E>
- Typparameter:
E- is the type of the elements of aContainerView.
- 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>
A
ContainerView wraps one or several given Iterables or
arrays.
A ContainerView prevents that its accessed Iterables or
arrays are mutated. A ContainerView does not prevent that the
elements of its Iterable or array are mutated.- Autor:
- Silvan Wyss
-
Methodenübersicht
Modifikator und TypMethodeBeschreibungstatic <T> ContainerView<T> booleanAObjectequals aContainerViewwhen the object is aIterablethat contains exactly the same elements in the same order as theContainerView.static <T> ContainerView<T> forArray(T[] array) static <T> ContainerView<T> forArrays(T[]... arrays) static <T> ContainerView<T> forElementAndArray(T element, T[] array) static <T> ContainerView<T> forIterable(Iterable<T> iterable) static <T> ContainerView<T> forIterableAndElement(Iterable<T> iterable, T element) static <T> ContainerView<T> forIterables(Iterable<? extends T>... iterables) intgetCount()getStoredAtOneBasedIndex(int oneBasedIndex) inthashCode()booleaniterator()toString()Von Klasse geerbte Methoden AbstractExtendedContainer
createEmptyMutableList, getViewFromOneBasedStartIndexToOneBasedEndIndex, getViewOf, getViewOfStoredSelected, toOrderedListVon Klasse geerbte Methoden AbstractContainer
contains, containsAll, containsAll, containsAll, containsAny, containsAny, containsAnyOf, containsAnyOf, containsAsManyAs, containsEqualing, containsExactlyEqualingInSameOrder, containsExactlyInSameOrder, containsLessThan, containsMoreThan, containsNone, containsNone, containsNoneOf, containsOnce, containsOne, containsOne, containsOneEqualing, containsOnly, getAverage, getAverageOrZero, getCount, getCountOf, getMax, getMaxOrZero, getMedian, getMedianOrZero, getMin, getMinOrZero, getOneBasedIndexOfFirst, getOneBasedIndexOfFirstEqualElement, getOneBasedIndexOfFirstOccurrenceOf, getOptionalStoredFirst, getOptionalStoredFirst, getStandardDeviation, getStoredByMax, getStoredByMin, getStoredFirst, getStoredFirst, getStoredFirstOfType, getStoredInGroups, getStoredLast, getStoredOfType, getStoredOne, getStoredOne, getStoredOthers, getStoredSelected, getSum, getSumOfInts, getVariance, getViewFromOneBasedStartIndex, getViewToOneBasedEndIndex, getViewWithoutFirst, getViewWithoutFirst, getViewWithoutLast, getViewWithoutLast, isEmpty, to, toArray, toByteArray, toCharArray, toConcatenatedString, toDoubleArray, toIntArray, toLongArray, toMultiples, toNumbers, toReversedList, toStringArray, toStrings, toStringWithSeparator, toStringWithSeparator, toWithOneBasedIndexVon Schnittstelle geerbte Methoden EmptinessRequestable
containsAnyVon Schnittstelle geerbte Methoden Iterable
forEach, spliteratorVon Schnittstelle geerbte Methoden MaterializationRequestable
isView
-
Methodendetails
-
createEmpty
- Typparameter:
T- is the types the elements theContainerViewwould have.- Gibt zurück:
- an empty
ContainerView.
-
forArray
- Typparameter:
T- is the type of the elements of the given array.- Parameter:
array-- Gibt zurück:
- a new
ContainerViewfor the given array. - Löst aus:
ArgumentIsNullException- if the given array is null.
-
forArrays
- Typparameter:
T- is the type of the elements of the given arrays.- Parameter:
arrays-- Gibt zurück:
- a new
ContainerViewfor the given arrays. - Löst aus:
ArgumentIsNullException- if the given arrays is null.ArgumentIsNullException- if one of the given arrays is null.
-
forElementAndArray
- Typparameter:
T- is the type of the given element and the elements of the given array.- Parameter:
element-array-- Gibt zurück:
- a new
ContainerViewfor the given element and array. - Löst aus:
ArgumentIsNullException- if the given array is null.
-
forIterable
- Typparameter:
T- is the type of the elements of the given iterable.- Parameter:
iterable-- Gibt zurück:
- a new
ContainerViewfor the given iterable. - Löst aus:
ArgumentIsNullException- if the given iterable is null.
-
forIterableAndElement
- Typparameter:
T- is the type of the elements of the given iterable and element.- Parameter:
iterable-element-- Gibt zurück:
- a new
ContainerViewfor the given iterable and element. - Löst aus:
ArgumentIsNullException- if the given iterable is null.
-
forIterables
- Typparameter:
T- is the type of the elements of the given iterables.- Parameter:
iterables-- Gibt zurück:
- a new
ContainerViewfor the given iterables. - Löst aus:
ArgumentIsNullException- if the given iterables is null.ArgumentIsNullException- if one of the given iterables is null.
-
equals
AObjectequals aContainerViewwhen the object is aIterablethat contains exactly the same elements in the same order as theContainerView. -
getCount
public int getCount()- Gibt zurück:
- the number of elements of the current
CountRequestable.
-
getStoredAtOneBasedIndex
- Parameter:
oneBasedIndex-- Gibt zurück:
- the element at the given oneBasedIndex. The element can be null.
-
hashCode
-
isMaterialized
public boolean isMaterialized()- Gibt zurück:
- true if the current
MaterializationRequestableis materialized, false otherwise.
-
iterator
-
toString
-