org.apache.jackrabbit.commons.predicate
Class PathPredicate
java.lang.Object
org.apache.jackrabbit.commons.predicate.PathPredicate
- All Implemented Interfaces:
- Predicate
public class PathPredicate
- extends Object
- implements Predicate
The path filter provides hierarchical filtering.
Field Summary |
protected Pattern |
regex
the internal regex pattern |
Fields inherited from interface org.apache.jackrabbit.commons.predicate.Predicate |
TRUE |
Constructor Summary |
PathPredicate(String pattern)
Creates a new default path filter
| Pattern | Matches
| /foo | exactly "/foo"
| /foo.* | all paths starting with "foo |
Method Summary |
boolean |
evaluate(Object item)
Evaluates the predicate for the given object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
regex
protected final Pattern regex
- the internal regex pattern
PathPredicate
public PathPredicate(String pattern)
- Creates a new default path filter
| Pattern | Matches
| /foo | exactly "/foo"
| /foo.* | all paths starting with "foo."
| foo.* | all files starting with "foo."
| /foo/* | all direct children of /foo
| /foo/** | all children of /foo
- Parameters:
pattern
- the pattern
evaluate
public boolean evaluate(Object item)
- Description copied from interface:
Predicate
- Evaluates the predicate for the given object.
- Specified by:
evaluate
in interface Predicate
- Parameters:
item
- some object
- Returns:
- predicate result
- See Also:
Predicate.evaluate(java.lang.Object)
Copyright © 2004-2008 The Apache Software Foundation. All Rights Reserved.