org.weborganic.furi
Enum URIResolver.MatchRule

java.lang.Object
  extended by java.lang.Enum<URIResolver.MatchRule>
      extended by org.weborganic.furi.URIResolver.MatchRule
All Implemented Interfaces:
Serializable, Comparable<URIResolver.MatchRule>
Enclosing class:
URIResolver

public static enum URIResolver.MatchRule
extends Enum<URIResolver.MatchRule>

Defines the priority rule for matching patterns.

Version:
10 February 2009
Author:
Christophe Lauret

Enum Constant Summary
BEST_MATCH
          Indicates that the best matching pattern should be returned when finding a match in a list of patterns.
FIRST_MATCH
          Indicates that the first matching pattern should be returned when finding a match in a list of patterns.
 
Method Summary
static URIResolver.MatchRule valueOf(String name)
          Returns the enum constant of this type with the specified name.
static URIResolver.MatchRule[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

FIRST_MATCH

public static final URIResolver.MatchRule FIRST_MATCH
Indicates that the first matching pattern should be returned when finding a match in a list of patterns. The ordering of patterns in the list determines the matching pattern.


BEST_MATCH

public static final URIResolver.MatchRule BEST_MATCH
Indicates that the best matching pattern should be returned when finding a match in a list of patterns. The best matching patterns is determined by the longest common string.

Method Detail

values

public static URIResolver.MatchRule[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (URIResolver.MatchRule c : URIResolver.MatchRule.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static URIResolver.MatchRule valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null