org.apache.jackrabbit.commons.predicate
Class PathPredicate

java.lang.Object
  extended by 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
 
Method Summary
 boolean evaluate(Object item)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

regex

protected final Pattern regex
the internal regex pattern

Constructor Detail

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
Method Detail

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.