How can I create a apache commons 3.1 Range object?
The java docs say:
\"An immutable range of objects from a minimum to maximum point in
The constructor of Range appears to be private so a static method may be the preferred way of constructing the object.
For example, it looks like you could use the static method between
to construct a Range:
Range.between(100, 200);
However there are other static methods, it just depends what you need.
Range
is an abstract class. Use IntRange range = new IntRange(100, 200)
instead.