public synchronized boolean add ( String key , T value ) { if ( key . length ( ) > 3 && key . endsWith ( WILDCARD ) && key . charAt ( key . length ( ) - 2 ) != ' ' ) { throw new IllegalArgumentException ( "Unsupported use of wildcard in key " + key ) ; } // Find the key in the structure (build out to it) Node < T > current = internalFind ( key , false ) ; // Return false if the key already exists if ( current . getValue ( ) != null ) return false ; // Set the value and return true current . setValue ( value ) ; return true ; }
Add a new value using the given key .