private void checkConsumed(boolean setConsumed) {
        if (consumed) {
            throw new IllegalStateException(MESSAGE_STREAM_CONSUMED);
        }

        if (setConsumed) {
            consumed = true;
        }
    }
Make the problem someone else's...

@return A "real" Stream with the single element
common-parent/singletonstream/src/main/java/com/speedment/common/singletonstream/SingletonStream.java