default Optional<T> findOne() {
        try (ResultIterator<T> iter = iterator()) {
            if (!iter.hasNext()) {
                return Optional.empty();
            }

            final T r = iter.next();

            if (iter.hasNext()) {
                throw new IllegalStateException("Expected zero to one elements, but found multiple");
            }

            return Optional.ofNullable(r);
        }
    }
Returns the only row in the result set, if any. Returns {@code Optional.empty()} if zero
rows are returned, or if the row itself is {@code null}.
@throws IllegalStateException if the result set contains multiple rows
@return the only row in the result set, if any.
core/src/main/java/org/jdbi/v3/core/result/ResultIterable.java