Moved IntRange.count to Ranges class.

This commit is contained in:
Evgeny Gerashchenko
2013-01-22 20:39:36 +04:00
parent af0997a147
commit eb8107115d
4 changed files with 10 additions and 5 deletions
-4
View File
@@ -111,10 +111,6 @@ public final class IntRange implements Range<Integer>, IntIterable {
return new IntIteratorImpl(start, count, 1);
}
public static IntRange count(int length) {
return new IntRange(0, length);
}
private static class IntIteratorImpl extends IntIterator {
private int cur;
private int step;
+4
View File
@@ -342,5 +342,9 @@ public class Ranges {
}
}
public static IntRange arrayIndices(int length) {
return new IntRange(0, length);
}
private Ranges() {}
}