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

        if (setConsumed) {
            consumed = true;
        }
    }
An implementation of an IntStream that takes exactly one element as its
source.

This implementation supports optimized implementations of most terminal
operations and a some number of intermediate operations. Un-optimized
operations just returns a wrapped standard IntStream implementation.

For performance reasons, the IntStream does not throw an
IllegalStateOperation if methods are called after a terminal operation has
been called on the Stream. This could be implemented using a boolean value
set by each terminating op. All other ops could then assert this flag.

@author Per Minborg
@since  1.0.0
common-parent/singletonstream/src/main/java/com/speedment/common/singletonstream/SingletonIntStream.java