/** Two DFAStates are equal if their NFA configuration sets are the * same. This method is used to see if a DFA state already exists. * * Because the number of alternatives and number of NFA configurations are * finite, there is a finite number of DFA states that can be processed. * This is necessary to show that the algorithm terminates. * * Cannot test the DFA state numbers here because in DFA.addState we need * to know if any other state exists that has this exact set of NFA * configurations. The DFAState state number is irrelevant. */ @Override public boolean equals(Object o) { // compare set of NFA configurations in this set with other DFAState other = (DFAState)o; return this.nfaConfigurations.equals(other.nfaConfigurations); }
/** Two DFAStates are equal if their NFA configuration sets are the * same. This method is used to see if a DFA state already exists. * * Because the number of alternatives and number of NFA configurations are * finite, there is a finite number of DFA states that can be processed. * This is necessary to show that the algorithm terminates. * * Cannot test the DFA state numbers here because in DFA.addState we need * to know if any other state exists that has this exact set of NFA * configurations. The DFAState state number is irrelevant. */ public boolean equals(Object o) { // compare set of NFA configurations in this set with other DFAState other = (DFAState)o; return this.nfaConfigurations.equals(other.nfaConfigurations); }
/** Two DFAStates are equal if their NFA configuration sets are the * same. This method is used to see if a DFA state already exists. * * Because the number of alternatives and number of NFA configurations are * finite, there is a finite number of DFA states that can be processed. * This is necessary to show that the algorithm terminates. * * Cannot test the DFA state numbers here because in DFA.addState we need * to know if any other state exists that has this exact set of NFA * configurations. The DFAState state number is irrelevant. */ public boolean equals(Object o) { // compare set of NFA configurations in this set with other DFAState other = (DFAState)o; return this.nfaConfigurations.equals(other.nfaConfigurations); }
/** Two DFAStates are equal if their NFA configuration sets are the * same. This method is used to see if a DFA state already exists. * * Because the number of alternatives and number of NFA configurations are * finite, there is a finite number of DFA states that can be processed. * This is necessary to show that the algorithm terminates. * * Cannot test the DFA state numbers here because in DFA.addState we need * to know if any other state exists that has this exact set of NFA * configurations. The DFAState state number is irrelevant. */ @Override public boolean equals(Object o) { // compare set of NFA configurations in this set with other DFAState other = (DFAState)o; return this.nfaConfigurations.equals(other.nfaConfigurations); }