JUtil { public static void fur(int startIndex, int maxIndex, int spanNum, IntConsumer action) { for (int index = NumberUtil.limitInt(startIndex, 0, Integer.MAX_VALUE); index <= maxIndex; index += NumberUtil .limitInt(spanNum, 1, Integer.MAX_VALUE)) action.accept(index); }  static void fur(int startIndex, int maxIndex, int spanNum, IntConsumer action); static void copyProperties(Object target, Object source);  }
@Test public void test() { JUtil.fur(0, 0, 0, i -> { assertTrue(i == 0); }); JUtil.fur(1, 1, 0, i -> { assertTrue(i == 1); }); }