include state number in Automaton.toDot output

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1593507 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2014-05-09 10:22:32 +00:00
parent f849e4df71
commit 37a2466338
1 changed files with 2 additions and 2 deletions

View File

@ -598,8 +598,8 @@ public class Automaton implements Cloneable {
State[] states = getNumberedStates();
for (State s : states) {
b.append(" ").append(s.number);
if (s.accept) b.append(" [shape=doublecircle,label=\"\"];\n");
else b.append(" [shape=circle,label=\"\"];\n");
if (s.accept) b.append(" [shape=doublecircle,label=\"" + s.number + "\"];\n");
else b.append(" [shape=circle,label=\" " + s.number + "\"];\n");
if (s == initial) {
b.append(" initial [shape=plaintext,label=\"\"];\n");
b.append(" initial -> ").append(s.number).append("\n");