Package org.esa.snap.core.util
Class ForLoop
- java.lang.Object
-
- org.esa.snap.core.util.ForLoop
-
public class ForLoop extends Object
A programmatic, functional for-loop. AForLoop.Body
is executed for each index combination of a given array of dimensions. For example, given the dimensions {2, 3} (a 2D array) the body shall be called for the following sequence of indexes:{0, 0} {0, 1} {0, 2} {1, 0} {1, 1} {1, 2}
So higher indexes vary faster and correspond to inner loops. It is possible to execute multiple different bodies using the same for-loop instance.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
ForLoop.Body
-
Constructor Summary
Constructors Constructor Description ForLoop(int[] sizes)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ForLoop
execute(int[] sizes, ForLoop.Body body)
ForLoop
execute(ForLoop.Body body)
-
-
-
Method Detail
-
execute
public static ForLoop execute(int[] sizes, ForLoop.Body body)
-
execute
public ForLoop execute(ForLoop.Body body)
-
-