public static Collector<Double, ?, OptionalDouble> toOptionalDouble() {
        return toOptional(OptionalDouble::empty, OptionalDouble::of);
    }
Returns a {@code Collector} that accumulates 0 or 1 input {@code Double} elements into an
{@code OptionalDouble}. The returned collector will throw {@code IllegalStateException}
whenever 2 or more elements are present in a stream. Null elements are mapped to
{@code OptionalDouble.empty()}.

@return a {@code Collector} which collects 0 or 1 input {@code Double} elements into an
{@code OptionalDouble}.
core/src/main/java/org/jdbi/v3/core/collector/OptionalCollectors.java