@Override
	public boolean equals(Object o) {
		// compare set of ATN configurations in this set with other
		if ( this==o ) return true;

		if (!(o instanceof DFAState)) {
			return false;
		}

		DFAState other = (DFAState)o;
		// TODO (sam): what to do when configs==null?
		boolean sameSet = this.configs.equals(other.configs);
//		System.out.println("DFAState.equals: "+configs+(sameSet?"==":"!=")+other.configs);
		return sameSet;
	}
Two {@link DFAState} instances are equal if their ATN configuration sets
are the same. This method is used to see if a state already exists.

<p>Because the number of alternatives and number of ATN configurations are
finite, there is a finite number of DFA states that can be processed.
This is necessary to show that the algorithm terminates.</p>

<p>Cannot test the DFA state numbers here because in
{@link ParserATNSimulator#addDFAState} we need to know if any other state
exists that has this exact set of ATN configurations. The
{@link #stateNumber} is irrelevant.</p>
runtime/Java/src/org/antlr/v4/runtime/dfa/DFAState.java