Hi,
Is there any syntax/package allowing quick filling of java arrays with ranges of numbers, like in perl?
e.g.
int[] arr = new int[1000];
arr=(1..500,301..400,1001..1400); // returns [1,2,3,4,...,500,301,302,...,400,1001,1002,...1400]
Also, it here a package that allows getting the n-th number in such list of numbers as the above, without actually creating the array (which can be huge)?
e.g.
BunchOfRangesType bort = new BunchOfRangesType("1..500","301..400","1001..1400");
bort.get(0); // return 1
bort.get(500); // return 301
bort.get(501); // return 302
It's not too difficult to implement, but I guess it might be common so maybe it was already done.