public String toString(Collection<State> states, String[] alphabet,
			State starting) {
		int maxCellLen = 0;
		for (State state : states) {
			if (state.name().length() > maxCellLen) {
				maxCellLen = state.name().length();
			}
			List<String> eachStateMovesList = state.movesStringList();
			for (String eachMove : eachStateMovesList) {
				if (eachMove.length() > maxCellLen) {
					maxCellLen = eachMove.length();
				}
			}
		}

		StringBuilder sb = new StringBuilder();
		sb.append("Moves table:").append(System.getProperty("line.separator"));
		sb.append("starting state: ").append(starting)
				.append(System.getProperty("line.separator"));
		appendCell(sb, maxCellLen + 1, "");
		for (String ch : alphabet) {
			appendCell(sb, maxCellLen + 1, ch);
		}
		sb.append(System.getProperty("line.separator"));
		for (State state : states) {
			appendCell(sb, maxCellLen, state.name());
			for (String ch : alphabet) {
				Move m = state.getMove(ch);
				sb.append("|");
				appendCell(sb, maxCellLen, m.toString());
			}
			sb.append(System.getProperty("line.separator"));
		}
		return sb.toString();
	}