org.apache.jackrabbit.commons.predicate
Class PathPredicate
java.lang.Object
org.apache.jackrabbit.commons.predicate.PathPredicate
- All Implemented Interfaces:
- org.apache.commons.collections.Predicate
public class PathPredicate
- extends Object
- implements org.apache.commons.collections.Predicate
The path filter provides hierarchical filtering.
Field Summary |
protected Pattern |
regex
the internal regex pattern |
Constructor Summary |
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
|
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)
- Specified by:
evaluate
in interface org.apache.commons.collections.Predicate
- See Also:
Predicate.evaluate(java.lang.Object)
Copyright © 2004-2008 The Apache Software Foundation. All Rights Reserved.