@Test public void isRangePartAndInRangeFalseTest() { PageRange.IPageRangePart odd = PageRange.PageRangePartOddEven.ODD; PageRange.IPageRangePart seq = new PageRange.PageRangePartSequence(2, 14); PageRange.PageRangePartAnd pageRangePartAnd = new PageRange.PageRangePartAnd(odd, seq); Assert.assertFalse(pageRangePartAnd.isPageInRange(1)); }
public boolean isPageInRange(int pageNumber) { for (IPageRangePart sequence : sequences) { if (sequence.isPageInRange(pageNumber)) { return true; } } return false; }
PageRange { public boolean isPageInRange(int pageNumber) { for (IPageRangePart sequence : sequences) { if (sequence.isPageInRange(pageNumber)) { return true; } } return false; } }
PageRange { public boolean isPageInRange(int pageNumber) { for (IPageRangePart sequence : sequences) { if (sequence.isPageInRange(pageNumber)) { return true; } } return false; } PageRange();  PageRange(String pageRange); }
PageRange { public boolean isPageInRange(int pageNumber) { for (IPageRangePart sequence : sequences) { if (sequence.isPageInRange(pageNumber)) { return true; } } return false; } 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 boolean isPageInRange(int pageNumber) { for (IPageRangePart sequence : sequences) { if (sequence.isPageInRange(pageNumber)) { return true; } } return false; } 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();  }