eu.planets_project.ifr.core.servreg.api
Enum MatchingMode

java.lang.Object
  extended by java.lang.Enum<MatchingMode>
      extended by eu.planets_project.ifr.core.servreg.api.MatchingMode
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<MatchingMode>

public enum MatchingMode
extends java.lang.Enum<MatchingMode>

Matching modes as a strategy enumeration.


Enum Constant Summary
EXACT
          Exact string comparison, case-insensitive.
REGEX
          String comparison based on regular expressions (case-insensitive).
WILDCARD
          Wildcard string comparison, e.g.
 
Method Summary
abstract  boolean matches(java.lang.String value, java.lang.String pattern)
           
static MatchingMode valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static MatchingMode[] 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

EXACT

public static final MatchingMode EXACT
Exact string comparison, case-insensitive.


WILDCARD

public static final MatchingMode WILDCARD
Wildcard string comparison, e.g. "*Droid*" will match all "Droid", "Droid2", and "A droid service" (case-insensitive).


REGEX

public static final MatchingMode REGEX
String comparison based on regular expressions (case-insensitive).

Method Detail

values

public static MatchingMode[] 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 (MatchingMode c : MatchingMode.values())
    System.out.println(c);

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

valueOf

public static MatchingMode valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

matches

public abstract boolean matches(java.lang.String value,
                                java.lang.String pattern)
Parameters:
value - The value to match the pattern against
pattern - The pattern to match against
Returns:
True, if the value matches the pattern


Copyright © 2007-2010 The Planets Consortium. All Rights Reserved.