title: Fill arrays with ranges of numbers
body: <p>Is there any syntax/package allowing quick filling of java arrays with ranges of numbers, like in perl?</p>
  
  <p>e.g.</p>
  
  <pre><code>int[] arr = new int[1000];
  arr=(1..500,301..400,1001..1400); // returns [1,2,3,4,...,500,301,302,...,400,1001,1002,...1400]
  </code></pre>
  
  <p>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)?</p>
  
  <p>e.g.</p>
  
  <pre><code>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
  </code></pre>
  
  <p>It's not too difficult to implement, but I guess it might be common so maybe it was already done.</p>