@Override
    public <R> R collect(Supplier<R> supplier, BiConsumer<R, ? super T> accumulator, BiConsumer<R, R> combiner) {
        checkConsumed();
        requireNonNull(supplier);
        requireNonNull(accumulator);
        final R value = supplier.get();
        accumulator.accept(value, element);
        // the combiner is never used in a non-parallell stream
        return value;
    }
Creates and returns an optimized sequential {@link Stream} implementation
with only a single element if the element is non-null. if the element is
null, an empty Stream is returned.

@param element the single element or null
@param <T> the type of the stream elements
@return a singleton sequential stream
common-parent/singletonstream/src/main/java/com/speedment/common/singletonstream/SingletonStream.java