org.ourgrid.common.matcher
Class Matcher
java.lang.Object
org.ourgrid.common.matcher.Matcher
public class Matcher
- extends java.lang.Object
The Matcher is responsible for evaluate an expression (i.e, given a set of
attributes, verify if the expression matches with them)
Method Summary |
static boolean |
match(java.lang.String jobRequirement,
java.util.Map<java.lang.String,java.lang.String> machineAtt)
Verifies if an expression matches with a set of attributes. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ATT_FALSE
public static final int ATT_FALSE
- See Also:
- Constant Field Values
ATT_TRUE
public static final int ATT_TRUE
- See Also:
- Constant Field Values
ATT_UNDEFINED
public static final int ATT_UNDEFINED
- See Also:
- Constant Field Values
match
public static boolean match(java.lang.String jobRequirement,
java.util.Map<java.lang.String,java.lang.String> machineAtt)
- Verifies if an expression matches with a set of attributes.
- Parameters:
jobRequirement
- The expression following the JDF grammar
definitionsmachineAtt
- Is a map with name and value pairs.
- Returns:
true
if matched and false
otherwise.