public State[] getStatesOnTerminal(String terminal, State[] states,
			Automaton automaton) {
		ArrayList list = new ArrayList();
		for (int k = 0; k < states.length; k++) {
			State state = states[k];
			Transition[] transitions = automaton.getTransitionsFromState(state);
			for (int i = 0; i < transitions.length; i++) {
				FSATransition transition = (FSATransition) transitions[i];
				if (transition.getLabel().equals(terminal)) {
					State toState = transition.getToState();
					State[] closure = ClosureTaker.getClosure(toState,
							automaton);
					for (int j = 0; j < closure.length; j++) {
						if (!list.contains(closure[j])) {
							list.add(closure[j]);
						}
					}
				}
			}
		}
		return (State[]) list.toArray(new State[0]);
	}