public interface ThreeDimensionalReadAccess<T> extends MultiDimensionalReadAccess<T>
| Modifier and Type | Field and Description |
|---|---|
static ThreeDimensionalReadAccess<?> |
EMPTY
Empty 3dimensional read access.
|
| Modifier and Type | Method and Description |
|---|---|
static <E> ThreeDimensionalReadAccess<E> |
empty()
Get an empty 3dimensional read access.
|
default T |
getElement(int... indexes)
Get the element located at the given indexes.
|
T |
getElementAt(int ix,
int iy,
int iz)
Get the element 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> ThreeDimensionalReadAccess<E> |
singleton(E singleElement)
Get a 3dimensional read access for a single element.
|
int |
sizeX()
Get the number of elements in X direction.
|
int |
sizeY()
Get the number of elements in Y direction
|
int |
sizeZ()
Get the number of elements in Z direction
|
default TwoDimensionalReadAccess<T> |
subAtX(int fixX)
Get a 2-dimensional view of the plane at the given X index.
|
default TwoDimensionalReadAccess<T> |
subAtY(int fixY)
Get a 2-dimensional view of the plane at the given Y index.
|
default TwoDimensionalReadAccess<T> |
subAtZ(int fixZ)
Get a 2-dimensional view of the plane at the given Z index.
|
default <TOUT> ThreeDimensionalReadAccess<TOUT> |
view(Function1<TOUT,T> conv)
Get a view of this two dimensional array 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.
|
empty, linearizedstatic final ThreeDimensionalReadAccess<?> EMPTY
empty() instead.int sizeX()
int sizeY()
int sizeZ()
T getElementAt(int ix, int iy, int iz)
default T getElement(int... indexes)
MultiDimensionalReadAccessgetElement in interface MultiDimensionalReadAccess<T>indexes - MultiDimensional.getNumDimensions() indexes inside the bounds
defined by MultiDimensional.getSizes()@NotNull default TwoDimensionalReadAccess<T> subAtX(int fixX)
fixX - fix X indexfixX@NotNull default TwoDimensionalReadAccess<T> subAtY(int fixY)
fixY - fix Y indexfixY@NotNull default TwoDimensionalReadAccess<T> subAtZ(int fixZ)
fixZ - fix Z indexfixZdefault 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 <TOUT> ThreeDimensionalReadAccess<TOUT> view(@NotNull Function1<TOUT,T> conv)
TOUT - element type provided by the viewconv - element converterdefault 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 static <E> ThreeDimensionalReadAccess<E> empty()
E - element typeEMPTY in a form the compiler accepts@NotNull static <E> ThreeDimensionalReadAccess<E> singleton(E singleElement)
E - element typesingleElement - single element