question: public void updateFieldState ( FieldEnableState fieldEnableState , String panelName ) { for ( String menuOption : keyOrderList ) { List < FieldIdEnum > fieldList = new ArrayList < FieldIdEnum > ( ) ; for ( FieldIdEnum fieldKey : fieldMap . keySet ( ) ) { boolean value = fieldMap . get ( fieldKey ) ; if ( value ) { fieldList . add ( fieldKey ) ; } } if ( fieldEnableState != null ) { fieldEnableState . add ( panelName , menuOption , fieldList ) ; } } }
target:  Gets the optimised field map, contains only the fields that should be enabled when the option is selected.