@Test public void testHasNextWithSpecifiedPage() { Page page = null; assertTrue(serviceQuery.hasNext(page)); page = mock(Page.class); when(page.getTotalNumEntries()).thenReturn(150); assertTrue(serviceQuery.hasNext(page)); when(page.getTotalNumEntries()).thenReturn(50); assertFalse(serviceQuery.hasNext(page)); }
@Override public boolean hasNext(@Nullable Page page) { return (page == null) || startIndex + pageSize < page.getTotalNumEntries(); }
ServiceQuery implements ServiceQueryInterface<Page> { @Override public boolean hasNext(@Nullable Page page) { return (page == null) || startIndex + pageSize < page.getTotalNumEntries(); } }
ServiceQuery implements ServiceQueryInterface<Page> { @Override public boolean hasNext(@Nullable Page page) { return (page == null) || startIndex + pageSize < page.getTotalNumEntries(); } ServiceQuery(String partialAwqlQuery, int startIndex, int pageSize); }
ServiceQuery implements ServiceQueryInterface<Page> { @Override public boolean hasNext(@Nullable Page page) { return (page == null) || startIndex + pageSize < page.getTotalNumEntries(); } ServiceQuery(String partialAwqlQuery, int startIndex, int pageSize); @Override ServiceQuery nextPage(@Nullable Page page); ServiceQuery nextPage(@Nullable AdGroupBidLandscapePage page); ServiceQuery nextPage(@Nullable CriterionBidLandscapePage page); @Override boolean hasNext(@Nullable Page page); boolean hasNext(@Nullable AdGroupBidLandscapePage page); boolean hasNext(@Nullable CriterionBidLandscapePage page); @Override String toString(); @Override boolean equals(Object obj); @Override int hashCode(); }
ServiceQuery implements ServiceQueryInterface<Page> { @Override public boolean hasNext(@Nullable Page page) { return (page == null) || startIndex + pageSize < page.getTotalNumEntries(); } ServiceQuery(String partialAwqlQuery, int startIndex, int pageSize); @Override ServiceQuery nextPage(@Nullable Page page); ServiceQuery nextPage(@Nullable AdGroupBidLandscapePage page); ServiceQuery nextPage(@Nullable CriterionBidLandscapePage page); @Override boolean hasNext(@Nullable Page page); boolean hasNext(@Nullable AdGroupBidLandscapePage page); boolean hasNext(@Nullable CriterionBidLandscapePage page); @Override String toString(); @Override boolean equals(Object obj); @Override int hashCode();  }