public interface ThreeDimensionalAccess<T> extends ThreeDimensionalReadAccess<T>, MultiDimensionalAccess<T>
Modifier and Type | Field and Description |
---|---|
static ThreeDimensionalAccess<?> |
EMPTY
Empty 3dimensional access.
|
Modifier and Type | Method and Description |
---|---|
default void |
changeAll(java.util.function.BiFunction<? super T,int[],? extends T> operator)
Change all elements in this multi-dimensional array.
|
default void |
changeAll(java.util.function.Function<? super T,? extends T> operator)
Change all elements in this multi-dimensional array.
|
static <E> ThreeDimensionalReadAccess<E> |
empty()
Get an empty 3dimensional access.
|
default void |
fillByIndex(IntFunction3<? extends T> setter)
Set all values depending on their indexes.
|
default void |
setElement(T value,
int... indexes)
Set the element located at the given indexes.
|
void |
setElementAt(T element,
int ix,
int iy,
int iz)
Set the element at the given indexes.
|
default TwoDimensionalAccess<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.
|
getElement, getElementAt, getNumDimensions, getNumElements, getSize, getSizes, singleton, sizeX, sizeY, sizeZ, view, visitAll, visitAll
change, setAll, setFrom, setFrom, setFrom
empty, linearized
static final ThreeDimensionalAccess<?> EMPTY
empty()
instead.void setElementAt(T element, int ix, int iy, int iz)
element
- element to setix
- index in X direction from 0
(included) to ThreeDimensionalReadAccess.sizeX()
(excluded)iy
- index in Y direction from 0
(included) to ThreeDimensionalReadAccess.sizeY()
(excluded)iz
- index in Y direction from 0
(included) to ThreeDimensionalReadAccess.sizeZ()
(excluded)default void setElement(T value, int... indexes)
MultiDimensionalAccess
setElement
in interface MultiDimensionalAccess<T>
value
- value to set at the location defined by the given indexesindexes
- MultiDimensional.getNumDimensions()
indexes inside the bounds
defined by MultiDimensional.getSizes()
@NotNull default TwoDimensionalAccess<T> subAtX(int fixX)
ThreeDimensionalReadAccess
subAtX
in interface ThreeDimensionalReadAccess<T>
fixX
- fix X indexfixX
@NotNull default TwoDimensionalReadAccess<T> subAtY(int fixY)
ThreeDimensionalReadAccess
subAtY
in interface ThreeDimensionalReadAccess<T>
fixY
- fix Y indexfixY
@NotNull default TwoDimensionalReadAccess<T> subAtZ(int fixZ)
ThreeDimensionalReadAccess
subAtZ
in interface ThreeDimensionalReadAccess<T>
fixZ
- fix Z indexfixZ
default void changeAll(@NotNull java.util.function.BiFunction<? super T,int[],? extends T> operator)
MultiDimensionalAccess
changeAll
in interface MultiDimensionalAccess<T>
operator
- operator to change the value, with the current value as first
argument and the indexes as second, returns the new valuedefault void changeAll(@NotNull java.util.function.Function<? super T,? extends T> operator)
MultiDimensionalAccess
changeAll
in interface MultiDimensionalAccess<T>
operator
- operator to change the value, with the current value as argumentdefault void fillByIndex(@NotNull IntFunction3<? extends T> setter)
setter
- setter which provides the value to set for each index combination@NotNull static <E> ThreeDimensionalReadAccess<E> empty()
empty
in interface ThreeDimensionalReadAccess<T>
E
- element typeEMPTY
in a form the compiler accepts