Add state {@code D} to the DFA if it is not already present, and return
the actual instance stored in the DFA. If a state equivalent to {@code D}
is already in the DFA, the existing state is returned. Otherwise this
method returns {@code D} after adding it to the DFA.
<p>If {@code D} is {@link #ERROR}, this method returns {@link #ERROR} and
does not change the DFA.</p>
@param dfa The dfa
@param D The DFA state to add
@return The state stored in the DFA. This will be either the existing
state if {@code D} is already in the DFA, or {@code D} itself if the
state was not already present.
Add state {@code D} to the DFA if it is not already present, and return the actual instance stored in the DFA. If a state equivalent to {@code D} is already in the DFA, the existing state is returned. Otherwise this method returns {@code D} after adding it to the DFA.
<p>If {@code D} is {@link #ERROR}, this method returns {@link #ERROR} and does not change the DFA.</p>
@param dfa The dfa @param D The DFA state to add @return The state stored in the DFA. This will be either the existing state if {@code D} is already in the DFA, or {@code D} itself if the state was not already present.