@Test public void intervalAsReverseArray() { Integer[] array = Interval.toReverseArray(1, 5); Verify.assertSize(5, array); Assert.assertTrue(ArrayIterate.contains(array, 1)); Assert.assertTrue(ArrayIterate.contains(array, 5)); Assert.assertEquals(ArrayIterate.getFirst(array), Integer.valueOf(5)); Assert.assertEquals(ArrayIterate.getLast(array), Integer.valueOf(1)); }
@Override public void run() { try { this.procedure = this.procedureFactory.create(); ArrayIterate.forEach(this.array, this.start, this.end - 1, this.procedure); } catch (Throwable newError) { this.taskRunner.setFailed(newError); } finally { this.taskRunner.taskCompleted(this); } }
private void combineTasks() { if (!this.combiner.useCombineOne()) { this.combiner.combineAll(ArrayIterate.collect(this.procedures, this.procedureFunction)); } }