code: public static <E> E one(Iterator<E> iterator) {
          return new OneElement<E>().apply(iterator);
      }
docs: Yields the only element.
  
  @param <E> the element type parameter
  @param iterator the iterator to be searched
  @throws IllegalStateException if more than one element is found
  @throws IllegalArgumentException if no element matches
  @return the found element