|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.common.collect.FluentIterable<IterableWithMarker<E>>
org.jclouds.collect.PagedIterable<E>
@Beta public abstract class PagedIterable<E>
Extends FluentIterable allowing you to lazily advance through
sequence of pages in a result set. Typically used in APIs that return only a
certain number of records at a time.
concat() convenience function, and iterate.
FluentIterable extends Image> images = imageApi.listInDetail().concat();
for (Image image: images) {
System.out.println(image);
}
Another usage is to employ the concat() convenience function, and one
of the methods from FluentIterable.
Optional extends Image> image = imageApi.listInDetail().concat().firstMatch(isInterestingImage());
System.out.println(image.orNull());
...
private static Predicate isInterestingImage() {
return new Predicate() {
@Override
public boolean apply(Image image) {
return image.getName().startsWith("Arch");
}
};
}
| Constructor Summary | |
|---|---|
PagedIterable()
|
|
| Method Summary | |
|---|---|
com.google.common.collect.FluentIterable<E> |
concat()
Combines all the pages into a single unmodifiable iterable. |
| Methods inherited from class com.google.common.collect.FluentIterable |
|---|
allMatch, anyMatch, contains, copyInto, cycle, filter, filter, first, firstMatch, from, from, get, index, isEmpty, last, limit, size, skip, toArray, toList, toMap, toSet, toSortedList, toSortedSet, toString, transform, transformAndConcat, uniqueIndex |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.lang.Iterable |
|---|
iterator |
| Constructor Detail |
|---|
public PagedIterable()
| Method Detail |
|---|
public com.google.common.collect.FluentIterable<E> concat()
FluentIterableblobs = blobstore.list(...).concat(); for (StorageMetadata blob : blobs) { process(blob); }
Iterators.concat(java.util.Iterator extends T>, java.util.Iterator extends T>)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||