code: public @Nonnull SetType getThreadSet(@Nonnull Collection<ThreadType> threads) {
          if (threads.isEmpty()) return emptySet;
  
          Set<ThreadType> threadSet = threads instanceof Set
                  ? (Set<ThreadType>) threads
                  : new LinkedHashSet<ThreadType>(threads)
          ;
          return createSet(threadSet);
      }
docs: Instantiate {@link ThreadSet} scoped to this runtime.