Class TemplateSet<T>


  • public class TemplateSet<T>
    extends Object
    A MatchSearcher maintains a collection of MatchTemplates. The collection can be added to and removed from [TBD]. It can be searched for an entry matching a supplied path; if there is one, bindings are updated and an associated value returned.
    Author:
    eh
    • Constructor Detail

      • TemplateSet

        public TemplateSet()
    • Method Detail

      • register

        public void register​(String path,
                             T result)
        Add the template path to the collection, associated with the supplied result value.
      • unregister

        public void unregister​(String path)
        Remove the entry with the given template path from the collection.
      • lookup

        public T lookup​(Map<String,​String> bindings,
                        String path,
                        javax.ws.rs.core.MultivaluedMap<String,​String> queryParams)
        Search the collection for the most specific entry that matches path. If there isn't one, return null. If there is, return the associated value, and update the bindings with the matches variables.