private static < T > void updateAppLinkDataTable ( Map < String , Set < T > > table , boolean add , String key , T value , String tracePrefix ) // F743-26072 { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; Set < T > values = table . get ( key ) ; if ( add ) { if ( isTraceOn && tc . isDebugEnabled ( ) && tracePrefix != null ) Tr . debug ( tc , tracePrefix + ": adding " + key + " = " + value ) ; if ( values == null ) { values = new LinkedHashSet < T > ( ) ; table . put ( key , values ) ; } values . add ( value ) ; } else { if ( isTraceOn && tc . isDebugEnabled ( ) && tracePrefix != null ) Tr . debug ( tc , tracePrefix + ": removing " + key + " = " + value ) ; if ( values != null ) // d657052 { values . remove ( value ) ; if ( values . size ( ) == 0 ) // d657052 { if ( isTraceOn && tc . isDebugEnabled ( ) && tracePrefix != null ) Tr . debug ( tc , tracePrefix + ": removing " + key ) ; table . remove ( key ) ; } } else { if ( isTraceOn && tc . isDebugEnabled ( ) && tracePrefix != null ) Tr . debug ( tc , tracePrefix + ": key not found: " + key ) ; } } }
Updates a map from name to set of values .