code: public final T single() {
          Iterator<T> it = iterator();
          if (it.hasNext()) {
              T v = it.next();
              if (it.hasNext()) {
                  throw new IndexOutOfBoundsException("The source has more than one element.");
              }
              return v;
          }
          throw new NoSuchElementException("The source is empty.");
      }
docs: Returns the single element of this sequence or throws a NoSuchElementException
  if this sequence is empty or IndexOutOfBoundsException if this sequence has more
  than on element
  @return the single element of the sequence
  @throws IndexOutOfBoundsException if the sequence has more than one element
  @throws NoSuchElementException if the sequence is empty
  @since 1.0
  @see #single(Object)