code: public static <T> BinaryOperator<T> toOnlyOne(final String message) {
          return (t, t2) -> {
              validState(false, message);
              return null;
          };
      }
docs: A {@link BinaryOperator} that can be used in reduce operations to uphold invariants. For example, to ensure a stream only contains at most one element:
  
  <pre>
  final Stream&lt;Element&gt; streamOfElements = ...
  final Long uniqueId = 1L;
  final Optional&lt;Element&gt; foundElement = streamOfElements.filter(e -&gt; uniqueId.equals(e.id))
  .reduce(toOnlyOne("Expected only one or none element to match given id"));
  </pre>
  
  @param <T>
  the type of the elements in the stream
  @param message
  the exception message to use
  
  @return nothing, as this method will always throw an {@link se.sawano.java.commons.lang.validate.exception.IllegalStateValidationException}