T - The type of value in this Iterable.public class IterableStream<T> extends Object implements Iterable<T>
Code sample using Stream
// process the stream
myIterableStream.stream().forEach(resp -> {
if (resp.getStatusCode() == HttpURLConnection.HTTP_OK) {
System.out.printf("Response headers are %s. Url %s%n", resp.getDeserializedHeaders(),
resp.getRequest().getUrl());
resp.getItems().forEach(value -> {
System.out.printf("Response value is %d%n", value);
});
}
});
Code sample using Iterator
// Iterate over iterator for (PagedResponseBase<String,Integer> resp : myIterableStream) { if (resp.getStatusCode() ==HttpURLConnection.HTTP_OK) {System.out.printf("Response headers are %s. Url %s%n", resp.getDeserializedHeaders(), resp.getRequest().getUrl()); resp.getItems().forEach(value -> {System.out.printf("Response value is %d%n", value); }); } }
Code sample using Stream and filter
// process the stream myIterableStream.stream().filter(resp -> resp.getStatusCode() ==HttpURLConnection.HTTP_OK) .limit(10) .forEach(resp -> {System.out.printf("Response headers are %s. Url %s%n", resp.getDeserializedHeaders(), resp.getRequest().getUrl()); resp.getItems().forEach(value -> {System.out.printf("Response value is %d%n", value); }); });
Iterable| Constructor and Description |
|---|
IterableStream(Flux<T> flux)
Creates instance given
Flux. |
| Modifier and Type | Method and Description |
|---|---|
Iterator<T> |
iterator()
Utility function to provide
Iterator of value T. |
Stream<T> |
stream()
Utility function to provide
Stream of value T. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorCopyright © 2019 Microsoft Corporation. All rights reserved.