com.sun.jersey.server.impl.uri.rules.automata
Class AutomataMatchingUriTemplateRules<R>
java.lang.Object
com.sun.jersey.server.impl.uri.rules.automata.AutomataMatchingUriTemplateRules<R>
- All Implemented Interfaces:
- UriRules<R>
public class AutomataMatchingUriTemplateRules<R>
- extends Object
- implements UriRules<R>
UriRules implementation based on a TRIE/Finite Automata.
This class has been made abstract because it needs to fixed in terms
of supporting the UriRules interface and matching using more general regular
expressions.
- Author:
- Frank D. Martinez. fmartinez@asimovt.com
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AutomataMatchingUriTemplateRules
public AutomataMatchingUriTemplateRules(List<PatternRulePair<R>> rules)
match
public Iterator<R> match(CharSequence path,
UriMatchResultContext resultContext)
- Description copied from interface:
UriRules
- Match a URI path to the collection of rules and iterate over
the matching rules.
- Specified by:
match
in interface UriRules<R>
- Parameters:
path
- the URI path to be matchedresultContext
- the context to store the match result.
The result will be set each time Iterator.next()
is called
according to the pattern associated with the returned rule.
The matching groups in the result are stored in the same order as
the pattern's capturing groups.
- Returns:
- an iterator of matching rules
Copyright © 2013 Oracle Corporation. All Rights Reserved.