blob: 65bcc60f8c6909b34439ecc9e7ce00ad9d4d080b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
package com.modulus.common.collections;
public class Collections2 {
static public Integer[] rangeAsObjects(int start, int stop)
{
Integer[] result = new Integer[stop-start];
for(int i=0;i<stop-start;i++)
result[i] = start+i;
return result;
}
static public int[] range(int start, int stop)
{
int[] result = new int[stop-start];
for(int i=0;i<stop-start;i++)
result[i] = start+i;
return result;
}
static public int[] range(int stop){
return range(0, stop);
}
}
|