code: public Set<NFAState<T>> getAll()
      {
          Set<NFAState<T>> set = new NumSet<>();
          Map<NFAState<T>,Integer> indexOf = new NumMap<>();
          Deque<NFAState<T>> stack = new ArrayDeque<>();
          for (NFAState<T> state : this)
          {
              if (!indexOf.containsKey(state))
              {
                  collect(state, indexOf, stack, set);
              }
  
          }
          return set;
      }
docs: Returns a set of all connected NFAState<R>s
  @return