/** * * @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); } }