public final void addResource ( final String resouceName , final URL urlToResource ) { if ( ( urlToResource == null ) || ( resouceName == null ) ) { return ; } if ( this . resourcesMap . containsKey ( resouceName . replace ( ' ' , ' ' ) ) ) { final Object to = this . resourcesMap . get ( resouceName . replace ( ' ' , ' ' ) ) ; if ( to instanceof URL ) { final URL uo = ( URL ) to ; final List l = new ArrayList ( ) ; l . add ( uo ) ; this . resourcesMap . put ( resouceName . replace ( ' ' , ' ' ) , l ) ; } else if ( to instanceof List ) { final List uo = ( List ) to ; uo . add ( urlToResource ) ; this . resourcesMap . put ( resouceName . replace ( ' ' , ' ' ) , uo ) ; } } else { this . resourcesMap . put ( resouceName . replace ( ' ' , ' ' ) , urlToResource ) ; } }
add a resource