public interface MultiDimensionalReadAccess<T> extends MultiDimensional
Modifier and Type | Field and Description |
---|---|
static MultiDimensionalReadAccess<?> |
EMPTY0
Empty multi-dimensional read access for 0 dimensions.
|
static MultiDimensionalReadAccess<?> |
EMPTY1
Empty multi-dimensional read access for 1 dimension.
|
static MultiDimensionalReadAccess<?> |
EMPTY2
Empty multi-dimensional read access for 2 dimensions.
|
static MultiDimensionalReadAccess<?> |
EMPTY3
Empty multi-dimensional read access for 3 dimensions.
|
static MultiDimensionalReadAccess<?> |
EMPTY4
Empty multi-dimensional read access for 4 dimensions.
|
static MultiDimensionalReadAccess<?> |
EMPTY5
Empty multi-dimensional read access for 4 dimensions.
|
static MultiDimensionalReadAccess<?> |
EMPTY6
Empty multi-dimensional read access for 4 dimensions.
|
static MultiDimensionalReadAccess<?> |
EMPTY7
Empty multi-dimensional read access for 4 dimensions.
|
Modifier and Type | Method and Description |
---|---|
static <E> MultiDimensionalReadAccess<E> |
empty(int numDimensions) |
T |
getElement(int... indexes)
Get the element located at the given indexes.
|
default java.lang.Iterable<T> |
linearized()
Get an iterable over all elements of this multi-dimensional access.
|
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.
|
getNumDimensions, getNumElements, getSize, getSizes
static final MultiDimensionalReadAccess<?> EMPTY0
MultiDimensionalReadAccess.empty(0)
instead.static final MultiDimensionalReadAccess<?> EMPTY1
MultiDimensionalReadAccess.empty(1)
instead.static final MultiDimensionalReadAccess<?> EMPTY2
MultiDimensionalReadAccess.empty(2)
instead.static final MultiDimensionalReadAccess<?> EMPTY3
MultiDimensionalReadAccess.empty(3)
instead.static final MultiDimensionalReadAccess<?> EMPTY4
MultiDimensionalReadAccess.empty(4)
instead.static final MultiDimensionalReadAccess<?> EMPTY5
MultiDimensionalReadAccess.empty(5)
instead.static final MultiDimensionalReadAccess<?> EMPTY6
MultiDimensionalReadAccess.empty(6)
instead.static final MultiDimensionalReadAccess<?> EMPTY7
MultiDimensionalReadAccess.empty(7)
instead.T getElement(int... indexes)
indexes
- MultiDimensional.getNumDimensions()
indexes inside the bounds
defined by MultiDimensional.getSizes()
default void visitAll(@NotNull Procedure2<? super T,int[]> visitor)
visitor
- visitor called with an array element and its multi-indexdefault void visitAll(@NotNull Procedure1<? super T> visitor)
visitor
- element visitor called once with each element@NotNull default java.lang.Iterable<T> linearized()
@NotNull static <E> MultiDimensionalReadAccess<E> empty(int numDimensions)