com.buschmais.xo.api.ResultIterable Maven / Gradle / Ivy
The newest version!
package com.buschmais.xo.api;
/**
* An {@link Iterable} which allows retrieving a single result.
*
* @param
* The type returned by the {@link Iterable}.
*/
public interface ResultIterable extends Iterable {
/**
* Return a single result.
*
* A {@link XOException} is thrown if no or more than element is returned by the
* {@link Iterable}.
*
*
* @return The single result.
*/
T getSingleResult();
/**
* Return true
if a result is available.
*
* @return true
if a result is available.
*/
boolean hasResult();
/**
* Return an result iterator.
*
* @return The result iterator.
*/
ResultIterator iterator();
}