public HashSet getSetIncludingState(State state, Automaton automaton) {
		HashSet set = new HashSet();
		ArrayList list = new ArrayList();
		list.add(state);
		while (!list.isEmpty()) {
			ArrayList toAdd = new ArrayList();
			Iterator it = list.iterator();
			while (it.hasNext()) {
				State s = (State) it.next();
				toAdd.addAll(getStatesConnectedToState(s, automaton));
				set.add(s);
				it.remove();
			}
			addAllNotInSetToList(toAdd, set, list);
		}

		return set;
	}