public final class AdunaIterations extends Object
Utility methods for Aduna Iterations not already present in Iterations
| Modifier and Type | Method and Description |
|---|---|
static void |
closeQuietly(info.aduna.iteration.CloseableIteration<?,?> theCloseableIteration)
Quietly close the iteration
|
static <T,E extends Exception> |
consume(info.aduna.iteration.CloseableIteration<T,E> theIter)
Consume all of the results in the Iteration and then close it when iteration is complete.
|
static <T,E extends Exception> |
singleResult(info.aduna.iteration.CloseableIteration<T,E> theIter)
Return the first result of the iteration.
|
static <T,E extends Exception> |
size(info.aduna.iteration.CloseableIteration<T,E> theIter)
Return the number of elements left in the Iteration.
|
public static void closeQuietly(info.aduna.iteration.CloseableIteration<?,?> theCloseableIteration)
theCloseableIteration - the iteration to closepublic static <T,E extends Exception> Optional<T> singleResult(info.aduna.iteration.CloseableIteration<T,E> theIter) throws E extends Exception
theIter - the iterationEE extends Exceptionpublic static <T,E extends Exception> void consume(info.aduna.iteration.CloseableIteration<T,E> theIter) throws E extends Exception
theIter - the Iteration to consumeE - if there is an error while consuming the resultsE extends Exceptionpublic static <T,E extends Exception> long size(info.aduna.iteration.CloseableIteration<T,E> theIter) throws E extends Exception
theIter - the Iteration whose size should be computedE - if there is an error while iteratingE extends ExceptionCopyright © 2010-2016 Stardog Union. All Rights Reserved.