how to construct a apache commons 3.1 Range object

前端 未结 2 595
[愿得一人]
[愿得一人] 2021-01-19 01:28

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

2条回答
  •  心在旅途
    2021-01-19 02:15

    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.

提交回复
热议问题