public String toString() {if ( dfa.s0==null ) return null;StringBuilder buf = new StringBuilder();List<DFAState> states = dfa.getStates();for (DFAState s : states) {int n = 0;if ( s.edges!=null ) n = s.edges.length;for (int i=0; i<n; i++) {DFAState t = s.edges[i];if ( t!=null && t.stateNumber != Integer.MAX_VALUE ) {buf.append(getStateString(s));String label = getEdgeLabel(i);buf.append("-").append(label).append("->").append(getStateString(t)).append('\n');}}}String output = buf.toString();if ( output.length()==0 ) return null;return output;}

public override string ToString(){if (dfa.s0 == null){return null;}StringBuilder buf = new StringBuilder();if (dfa.states != null){List<DFAState> states = new List<DFAState>(dfa.states.Values);states.Sort((x,y)=>x.stateNumber - y.stateNumber);foreach (DFAState s in states){int n = s.edges != null ? s.edges.Length : 0;for (int i = 0; i < n; i++){DFAState t = s.edges[i];if (t != null && t.stateNumber != int.MaxValue){buf.Append(GetStateString(s));String label = GetEdgeLabel(i);buf.Append("-");buf.Append(label);buf.Append("->");buf.Append(GetStateString(t));buf.Append('\n');}}}}string output = buf.ToString();if (output.Length == 0){return null;}return output;}
