public Map . Entry getMatch ( String path ) { Map . Entry entry ; if ( path == null ) return null ; int l = path . indexOf ( ' ' ) ; if ( l < 0 ) { l = path . indexOf ( ' ' ) ; if ( l < 0 ) l = path . length ( ) ; } // try exact match entry = _exactMap . getEntry ( path , 0 , l ) ; if ( entry != null ) return ( Map . Entry ) entry . getValue ( ) ; // prefix search int i = l ; while ( ( i = path . lastIndexOf ( ' ' , i - 1 ) ) >= 0 ) { entry = _prefixMap . getEntry ( path , 0 , i ) ; if ( entry != null ) return ( Map . Entry ) entry . getValue ( ) ; } // Prefix Default if ( _prefixDefault != null ) return _prefixDefault ; // Extension search i = 0 ; while ( ( i = path . indexOf ( ' ' , i + 1 ) ) > 0 ) { entry = _suffixMap . getEntry ( path , i + 1 , l - i - 1 ) ; if ( entry != null ) return ( Map . Entry ) entry . getValue ( ) ; } // Default return _default ; }
Get the entry mapped by the best specification .