question: public void validationStateChanged ( K key , ValidationState newState ) { Set < ValidationState > states = validationErrorStates . get ( key ) ; if ( newState . isValid ( ) ) { if ( null == states ) { states = Collections . emptySet ( ) ; } boolean removed = states . remove ( newState ) ; if ( removed ) { if ( states . isEmpty ( ) ) { hideMessage ( key ) ; } else { showMessage ( key , states ) ; } notifyUpstream ( key , states ) ; } } else { if ( null == states ) { states = new HashSet < > ( ) ; validationErrorStates . put ( key , states ) ; } states . remove ( newState ) ; states . add ( newState ) ; showMessage ( key , states ) ; notifyUpstream ( key , states ) ; } }
target:  Processes a change on the validation state.