code: public static <T> Optional<T> singleOrEmptyShortCircuiting(Stream<T> stream) {
  		return stream.limit(2).map(Optional::ofNullable).reduce(Optional.empty(),
  				(a, b) -> a.isPresent() ^ b.isPresent() ? b : Optional.empty());
  	}
docs: Same behavior as {@link #singleOrEmpty}, except that it returns
  early if it is possible to do so.  Unfortunately, it is not possible
  to implement early-return behavior using the Collector interface,
  so MoreCollectors takes the stream as an argument.
  <p>
  Implementation credit to Thomas Jungblut <a href="http://stackoverflow.com/a/26810932/1153071">on StackOverflow</a>.