question: private LR1State mergeStates ( LR1State state , HashMap < LR1State , LR1State > equalStates ) { LR1State ret = state ; for ( LR1State s : equalStates . keySet ( ) ) { if ( equalStates . get ( s ) == state ) ret = ret . merge ( s ) ; } for ( LR1State s : equalStates . keySet ( ) ) { if ( equalStates . get ( s ) == state ) equalStates . put ( s , ret ) ; } return ret ; }
target:  Merges the given state with the states of the given map, which have the given state as the value. The mappings will be updated to the merged state.