com.sun.jersey.server.impl.uri.rules
Class AtomicMatchingPatterns<R>

java.lang.Object
  extended by com.sun.jersey.server.impl.uri.rules.AtomicMatchingPatterns<R>
All Implemented Interfaces:
UriRules<R>

public final class AtomicMatchingPatterns<R>
extends java.lang.Object
implements UriRules<R>

Rules associated with instances of {@link UriPattern) and matched to return at most one match.

The class will iterate through the collection of {@link UriPattern) until a match is found. Note that this does not scale.

Author:
[email protected]

Constructor Summary
AtomicMatchingPatterns(java.util.Collection<PatternRulePair<R>> rules)
           
 
Method Summary
 java.util.Iterator<R> match(java.lang.CharSequence path, UriMatchResultContext resultContext)
          Match a URI path to the collection of rules and iterate over the matching rules.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AtomicMatchingPatterns

public AtomicMatchingPatterns(java.util.Collection<PatternRulePair<R>> rules)
Method Detail

match

public java.util.Iterator<R> match(java.lang.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 matched
resultContext - 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.