code: public @Nonnull ThreadType onlyThread() throws IllegalStateException {
          if (size() != 1) throw new IllegalStateException(
                  "Exactly one thread expected in the set. Found " + size()
          );
  
          return threads.iterator().next();
      }
docs: Extract the only thread from set.
  
  @throws IllegalStateException if not exactly one thread present.