public State complete() {if (this.stateRegistry == null) throw new IllegalStateException();if (root.hasChildren()) replaceOrRegister(root);stateRegistry = null;return root;}

public State Complete(){if (this.stateRegistry == null){throw new InvalidOperationException();}if (root.HasChildren){ReplaceOrRegister(root);}stateRegistry = null;return root;}
