Package manifold.collections.api.range
Class RangeFun
- java.lang.Object
-
- manifold.collections.api.range.RangeFun
-
public final class RangeFun extends Object
Defines binding functions to enable range expressions such as:5kg to 10kgMostly intended for use withforloops:
andfor(int i: 1 to 10) {. . .} for(Length len: 10ft to 100ft step 6 unit inch) {. . .} for(var value: here to there) {. . .}ifstatements:
To use this class simply import the `to`, `step`, and other constants via:if (2 inside 1 to 5) {...}import static manifold.collections.api.range.RangeFun.*;
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRangeFun.ClosedFor internal use.static classRangeFun.Insidestatic classRangeFun.LeftOpenFor internal use.static classRangeFun.OpenFor internal use.static classRangeFun.Outsidestatic classRangeFun.RightOpenFor internal use.static classRangeFun.Stepstatic classRangeFun.Unit
-
Field Summary
Fields Modifier and Type Field Description static RangeFun.LeftOpen_tostatic RangeFun.Open_to_static RangeFun.Insideinsidestatic RangeFun.Outsideoutsidestatic RangeFun.Stepstepstatic RangeFun.Closedtostatic RangeFun.RightOpento_static RangeFun.Unitunit
-
Constructor Summary
Constructors Constructor Description RangeFun()
-
-
-
Field Detail
-
to
public static final RangeFun.Closed to
-
_to
public static final RangeFun.LeftOpen _to
-
to_
public static final RangeFun.RightOpen to_
-
_to_
public static final RangeFun.Open _to_
-
step
public static final RangeFun.Step step
-
unit
public static final RangeFun.Unit unit
-
inside
public static final RangeFun.Inside inside
-
outside
public static final RangeFun.Outside outside
-
-