@Override protected IterableWithMarker<T> computeNext() { if (unread) try { return current; } finally { unread = false; } else if (current.nextMarker().isPresent()) return current = markerToNext.apply(current.nextMarker().get()); else return endOfData(); }
/** * * @param initial * the initial set current data * @param markerToNext * produces the next set based on the marker * * @return iterable current data which continues if the user iterates beyond * the first page */ private static <T> Iterator<IterableWithMarker<T>> advancingIterator(IterableWithMarker<T> initial, Function<Object, IterableWithMarker<T>> markerToNext) { if (!initial.nextMarker().isPresent()) { return ImmutableSet.of(initial).iterator(); } return new AdvancingIterator<T>(initial, markerToNext); } }
/** * * @param initial * the initial set current data * @param markerToNext * produces the next set based on the marker * * @return iterable current data which continues if the user iterates beyond * the first page */ private static <T> Iterator<IterableWithMarker<T>> advancingIterator(IterableWithMarker<T> initial, Function<Object, IterableWithMarker<T>> markerToNext) { if (!initial.nextMarker().isPresent()) { return ImmutableSet.of(initial).iterator(); } return new AdvancingIterator<T>(initial, markerToNext); } }
/** * * @param initial * the initial set current data * @param markerToNext * produces the next set based on the marker * * @return iterable current data which continues if the user iterates beyond * the first page */ private static <T> Iterator<IterableWithMarker<T>> advancingIterator(IterableWithMarker<T> initial, Function<Object, IterableWithMarker<T>> markerToNext) { if (!initial.nextMarker().isPresent()) { return ImmutableSet.of(initial).iterator(); } return new AdvancingIterator<T>(initial, markerToNext); } }
/** * * @param initial * the initial set current data * @param markerToNext * produces the next set based on the marker * * @return iterable current data which continues if the user iterates beyond * the first page */ private static <T> Iterator<IterableWithMarker<T>> advancingIterator(IterableWithMarker<T> initial, Function<Object, IterableWithMarker<T>> markerToNext) { if (!initial.nextMarker().isPresent()) { return ImmutableSet.of(initial).iterator(); } return new AdvancingIterator<T>(initial, markerToNext); } }
/** * * @param initial * the initial set current data * @param markerToNext * produces the next set based on the marker * * @return iterable current data which continues if the user iterates beyond * the first page */ private static <T> Iterator<IterableWithMarker<T>> advancingIterator(IterableWithMarker<T> initial, Function<Object, IterableWithMarker<T>> markerToNext) { if (!initial.nextMarker().isPresent()) { return ImmutableSet.of(initial).iterator(); } return new AdvancingIterator<T>(initial, markerToNext); } }
/** * * @param initial * the initial set current data * @param markerToNext * produces the next set based on the marker * * @return iterable current data which continues if the user iterates beyond * the first page */ private static <T> Iterator<IterableWithMarker<T>> advancingIterator(IterableWithMarker<T> initial, Function<Object, IterableWithMarker<T>> markerToNext) { if (!initial.nextMarker().isPresent()) { return ImmutableSet.of(initial).iterator(); } return new AdvancingIterator<T>(initial, markerToNext); } }
@Override protected IterableWithMarker<T> computeNext() { if (unread) try { return current; } finally { unread = false; } else if (current.nextMarker().isPresent()) return current = markerToNext.apply(current.nextMarker().get()); else return endOfData(); }
@Override protected IterableWithMarker<T> computeNext() { if (unread) try { return current; } finally { unread = false; } else if (current.nextMarker().isPresent()) return current = markerToNext.apply(current.nextMarker().get()); else return endOfData(); }
@Override protected IterableWithMarker<T> computeNext() { if (unread) try { return current; } finally { unread = false; } else if (current.nextMarker().isPresent()) return current = markerToNext.apply(current.nextMarker().get()); else return endOfData(); }
@Override protected IterableWithMarker<T> computeNext() { if (unread) try { return current; } finally { unread = false; } else if (current.nextMarker().isPresent()) return current = markerToNext.apply(current.nextMarker().get()); else return endOfData(); }
@Override protected IterableWithMarker<T> computeNext() { if (unread) try { return current; } finally { unread = false; } else if (current.nextMarker().isPresent()) return current = markerToNext.apply(current.nextMarker().get()); else return endOfData(); }