@Test public void testUntil() throws Exception { int counter = 1; for (int i : Ints.until(8)) { assertEquals(counter++, i); } assertEquals(9, counter); }
public static Iterable<Integer> until(int end) { return new Ints(1, end); }
Ints implements Iterable<Integer> { public static Iterable<Integer> until(int end) { return new Ints(1, end); } }
Ints implements Iterable<Integer> { public static Iterable<Integer> until(int end) { return new Ints(1, end); } private  Ints(int start, int end); }
Ints implements Iterable<Integer> { public static Iterable<Integer> until(int end) { return new Ints(1, end); } private  Ints(int start, int end); static Iterable<Integer> until(int end); static Iterable<Integer> range(int start, int end); @Override Iterator<Integer> iterator(); }
Ints implements Iterable<Integer> { public static Iterable<Integer> until(int end) { return new Ints(1, end); } private  Ints(int start, int end); static Iterable<Integer> until(int end); static Iterable<Integer> range(int start, int end); @Override Iterator<Integer> iterator();  }