@Test public void getPages() { SplitByEveryXPagesParameters victim = new SplitByEveryXPagesParameters(5); assertEquals(1, victim.getPages(5).size()); assertEquals(2, victim.getPages(10).size()); assertThat(victim.getPages(15), CoreMatchers.hasItems(5, 10, 15)); }
@Override public Set<Integer> getPages(int upperLimit) { Set<Integer> pages = new NullSafeSet<Integer>(); for (int i = step; i <= upperLimit; i += step) { pages.add(i); } return pages; }
SplitByEveryXPagesParameters extends AbstractSplitByPageParameters { @Override public Set<Integer> getPages(int upperLimit) { Set<Integer> pages = new NullSafeSet<Integer>(); for (int i = step; i <= upperLimit; i += step) { pages.add(i); } return pages; } }
SplitByEveryXPagesParameters extends AbstractSplitByPageParameters { @Override public Set<Integer> getPages(int upperLimit) { Set<Integer> pages = new NullSafeSet<Integer>(); for (int i = step; i <= upperLimit; i += step) { pages.add(i); } return pages; } SplitByEveryXPagesParameters(int step); }
SplitByEveryXPagesParameters extends AbstractSplitByPageParameters { @Override public Set<Integer> getPages(int upperLimit) { Set<Integer> pages = new NullSafeSet<Integer>(); for (int i = step; i <= upperLimit; i += step) { pages.add(i); } return pages; } SplitByEveryXPagesParameters(int step); @Override Set<Integer> getPages(int upperLimit); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object other); }
SplitByEveryXPagesParameters extends AbstractSplitByPageParameters { @Override public Set<Integer> getPages(int upperLimit) { Set<Integer> pages = new NullSafeSet<Integer>(); for (int i = step; i <= upperLimit; i += step) { pages.add(i); } return pages; } SplitByEveryXPagesParameters(int step); @Override Set<Integer> getPages(int upperLimit); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object other);  }