public static State[] getClosure(State state, Automaton automaton) {
		List list = new ArrayList();
		list.add(state);
		for (int i = 0; i < list.size(); i++) {
			state = (State) list.get(i);
			Transition transitions[] = automaton.getTransitionsFromState(state);
			for (int k = 0; k < transitions.length; k++) {
				Transition transition = transitions[k];
				LambdaTransitionChecker checker = LambdaCheckerFactory
						.getLambdaChecker(automaton);
				/** if lambda transition */
				if (checker.isLambdaTransition(transition)) {
					State toState = transition.getToState();
					if (!list.contains(toState)) {
						list.add(toState);
					}
				}
			}
		}
		return (State[]) list.toArray(new State[0]);
	}