public static ResourceName create ( PathTemplate template , Map < String , String > values ) { if ( ! values . keySet ( ) . containsAll ( template . vars ( ) ) ) { Set < String > unbound = Sets . newLinkedHashSet ( template . vars ( ) ) ; unbound . removeAll ( values . keySet ( ) ) ; throw new ValidationException ( "unbound variables: %s" , unbound ) ; } return new ResourceName ( template , values , null ) ; }
Creates a new resource name from a template and a value assignment for variables .