@Test public void addSingleConstructor() { PageRange range = new PageRange("5"); Assert.assertEquals(Arrays.asList(5), range.getQualifyingPageNums(7)); }
public List<Integer> getQualifyingPageNums(int nbPages) { List<Integer> allPages = new ArrayList<>(); for (IPageRangePart sequence : sequences) { allPages.addAll(sequence.getAllPagesInRange(nbPages)); } return allPages; }
PageRange { public List<Integer> getQualifyingPageNums(int nbPages) { List<Integer> allPages = new ArrayList<>(); for (IPageRangePart sequence : sequences) { allPages.addAll(sequence.getAllPagesInRange(nbPages)); } return allPages; } }
PageRange { public List<Integer> getQualifyingPageNums(int nbPages) { List<Integer> allPages = new ArrayList<>(); for (IPageRangePart sequence : sequences) { allPages.addAll(sequence.getAllPagesInRange(nbPages)); } return allPages; } PageRange();  PageRange(String pageRange); }
PageRange { public List<Integer> getQualifyingPageNums(int nbPages) { List<Integer> allPages = new ArrayList<>(); for (IPageRangePart sequence : sequences) { allPages.addAll(sequence.getAllPagesInRange(nbPages)); } return allPages; } PageRange();  PageRange(String pageRange); PageRange addPageRangePart(IPageRangePart part); PageRange addPageSequence(int startPageNumber, int endPageNumber); PageRange addSinglePage(int pageNumber); List<Integer> getQualifyingPageNums(int nbPages); boolean isPageInRange(int pageNumber); @Override boolean equals(Object obj); @Override int hashCode(); }
PageRange { public List<Integer> getQualifyingPageNums(int nbPages) { List<Integer> allPages = new ArrayList<>(); for (IPageRangePart sequence : sequences) { allPages.addAll(sequence.getAllPagesInRange(nbPages)); } return allPages; } PageRange();  PageRange(String pageRange); PageRange addPageRangePart(IPageRangePart part); PageRange addPageSequence(int startPageNumber, int endPageNumber); PageRange addSinglePage(int pageNumber); List<Integer> getQualifyingPageNums(int nbPages); boolean isPageInRange(int pageNumber); @Override boolean equals(Object obj); @Override int hashCode();  }