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 inclusive."
"The objects need to either be implementations of Comparable or you need to supply a Comparator."
But when I try:
Range<Integer> range = new Range<Integer>(100, 200);
I get an error in my IDE that says required arguments are Integer, Integer, comparator.
Even though Integer implements the Comparable interface and thus I shouldn't need a extra comparator.
Can someone give me an example of how to construct a apache commons 3.1 Range object?