|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openbp.common.string.shellmatcher.MultiMatcher
public class MultiMatcher
This matcher class performs matches of objects against arbitrary search criteria.
Each criteria (class MultiPattern) consists of an attribute name and a pattern.
The pairs might be connected using an 'and' or an 'or' operation.
The attribute name of a pattern specifies a field of the object to match.
The matcher will look for an appropriate getter method (get\iAttributeName\i (),
is\iAttributeName\i for boolean values) to perform the match.
The attribute value can be one of the following types:
MultiPattern.setExactMatch(boolean) = true) or must contain the attribute value
(MultiPattern.setExactMatch(boolean) = false). If the pattern contains pattern matching characters
("*?[]"), a pattern matching (see the ShellMatcher class) will be performed on the
attribute value.
| Constructor Summary | |
|---|---|
MultiMatcher()
Default constructor |
|
| Method Summary | |
|---|---|
void |
addPattern(MultiPattern pattern)
Adds a pattern. |
void |
addPattern(java.lang.String attributeName,
java.lang.Object attributeValue)
Adds a pattern. |
boolean |
isOrRelation()
Gets the relation type. |
boolean |
match(java.lang.Object o)
Determines if an object matches the criteria. |
void |
setOrRelation(boolean orRelation)
Sets the relation type. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MultiMatcher()
| Method Detail |
|---|
public void addPattern(java.lang.String attributeName,
java.lang.Object attributeValue)
attributeName - Name of the attribute to matchattributeValue - Value of the attribute (see class comment)public void addPattern(MultiPattern pattern)
pattern - Pattern to addpublic boolean isOrRelation()
public void setOrRelation(boolean orRelation)
orRelation - true: OR relationpublic boolean match(java.lang.Object o)
o - Object to match against the pattern
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||