public interface OneDimensionalReadAccess<T> extends Indexable<T>, MultiDimensionalReadAccess<T>
| Modifier and Type | Interface and Description |
|---|---|
static class |
OneDimensionalReadAccess.Base<TT>
Abstract base class which provides useful implementations
for
Object.equals(Object), Object.hashCode(),
Object.toString(). |
Indexable.IndexableSpliterator<TElem>, Indexable.ListView<T>| Modifier and Type | Field and Description |
|---|---|
static OneDimensionalReadAccess<?> |
EMPTY
Empty 1dimensional read access.
|
EMPTY_INDEXABLE_STRING| Modifier and Type | Method and Description |
|---|---|
default OneDimensionalReadAccess.Base<T> |
asBase()
Make this read access usable as a base class with default Object methods implemented.
|
default OneDimensionalReadAccess<T> |
copy()
Get an independent copy.
|
static <E> OneDimensionalReadAccess<E> |
empty()
Get an empty 1dimensional read access.
|
default T |
getElement(int... indexes)
Get the element located at the given indexes.
|
default int |
getNumDimensions()
Get the number of dimensions used by this access,
|
default long |
getNumElements()
Get the combined number of elements in all dimensions.
|
default int |
getSize(int dim)
Get the size of the given dimension.
|
default int[] |
getSizes()
Get the sizes of the dimensions of this access.
|
static <E> OneDimensionalReadAccess<E> |
singleton(E singleElement)
Get a 1dimensional read access for a single element
|
default <TOUT> OneDimensionalReadAccess<TOUT> |
view(Function1<TOUT,? super T> conv)
Get a view of this 1-dimensional access with converted elements.
|
default void |
visitAll(Procedure1<? super T> visitor)
Visit all elements in this multi-dimensional array.
|
default void |
visitAll(Procedure2<? super T,int[]> visitor)
Visit all elements of this multi-dimensional array.
|
addToArray, addToArray, addToCollection, asCollection, asList, binarySearch, checkIndex, combine, compare, downCast, emptyIndexable, equal, findAll, findAllX, findFirst, findFirst, findFirst, findFirstX, findLast, findLast, findLast, findNext, findNext, findNext, findNextX, findPrevious, findPrevious, findPrevious, first, firstMatch, firstMatch, firstMatchX, forEachEntry, forEachEntryFragile, fromArray, fromCollection, fromCollection, fromCountable, fromCountable, fromEnumeration, fromEnumeration, fromIterable, fromIterable, fromIterable, fromIterable, fromIterator, fromList, fromOptional, frozenSpliterator, get, getMod, gyt, hash, headSet, indexedView, indexes, init, initByIndex, initFragile, intIndexes, isEmpty, isOrdered, isStrictlyOrdered, iterator, iterator, last, listIterator, mapArray, optional, ordered, reverse, rotated, spliterator, subSet, sybSet, tailSet, toString, view, view, viewArray, viewArray, viewAsBooleanIndexable, viewAsByteIndexable, viewAsCharIndexable, viewAsDict, viewAsDoubleIndexable, viewAsFloatIndexable, viewAsIntIndexable, viewAsLongIndexable, viewAsShortIndexable, viewByIndex, viewFragile, viewList, viewList, viewListN, viewListN, viewTuple, viewTuple, viewTuple, viewTuple, viewTuple, viewTuple, viewTuple, viewTuple, withAppendedItem, withCachedHash, withExchangedItemAt, withInsertedItemAt, withPrependedItem, withRemovedItemAt, withSwappedItemsAtaddAllTo, combined, combined, containsEq, containsRef, downCast, equal, equals, filtered, filteredToIndexable, filterToCountable, firstOrNull, foldLeft, forEachFragile, freeze, frozen, frozen, getAny, groupingBy, groupingBy, hasAll, hasAny, isSorted, isStrictlySorted, lastOrNull, mappingBy, mappingBy, optFirst, optLast, orderedCombination, parellelStream, sorted, stream, toArray, toArray, toList, toString, uniform, viewCollection, viewCollection, viewCollectionN, viewCollectionNempty, linearizedstatic final OneDimensionalReadAccess<?> EMPTY
empty() instead.default T getElement(int... indexes)
MultiDimensionalReadAccessgetElement in interface MultiDimensionalReadAccess<T>indexes - MultiDimensional.getNumDimensions() indexes inside the bounds
defined by MultiDimensional.getSizes()default int getNumDimensions()
MultiDimensionalgetNumDimensions in interface MultiDimensionaldefault int getSize(int dim)
MultiDimensionalgetSize in interface MultiDimensionaldim - dimension, greater than 0 and less than MultiDimensional.getNumDimensions()@NotNull default int[] getSizes()
MultiDimensionalgetSizes in interface MultiDimensionalMultiDimensional.getNumDimensions()default long getNumElements()
MultiDimensionalgetNumElements in interface MultiDimensional@NotNull default OneDimensionalReadAccess<T> copy()
@NotNull default <TOUT> OneDimensionalReadAccess<TOUT> view(@NotNull Function1<TOUT,? super T> conv)
TOUT - element type of the returned viewconv - converted applied to the elementsdefault void visitAll(@NotNull Procedure2<? super T,int[]> visitor)
MultiDimensionalReadAccessvisitAll in interface MultiDimensionalReadAccess<T>visitor - visitor called with an array element and its multi-indexdefault void visitAll(@NotNull Procedure1<? super T> visitor)
MultiDimensionalReadAccessvisitAll in interface MultiDimensionalReadAccess<T>visitor - element visitor called once with each element@NotNull default OneDimensionalReadAccess.Base<T> asBase()
@NotNull static <E> OneDimensionalReadAccess<E> empty()
@NotNull static <E> OneDimensionalReadAccess<E> singleton(E singleElement)