|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jackrabbit.commons.predicate.DepthPredicate
public class DepthPredicate
Implements a filter that filters item according to their (passed) depth.
Field Summary | |
---|---|
protected int |
maxDepth
The maximal depth |
protected int |
minDepth
The minimal depth |
Fields inherited from interface org.apache.jackrabbit.commons.predicate.Predicate |
---|
TRUE |
Constructor Summary | |
---|---|
DepthPredicate(int minDepth,
int maxDepth)
Creates a new depth filter for the given depths. |
Method Summary | |
---|---|
boolean |
evaluate(Object item)
Matches if the given depth is greater or equal the minimum depth and less or equal the maximum depth and if the call to matches(Item)
returns true . |
protected boolean |
matches(Item item)
Returns true . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final int minDepth
protected final int maxDepth
Constructor Detail |
---|
public DepthPredicate(int minDepth, int maxDepth)
minDepth
- the minimal depthmaxDepth
- the maximal depthMethod Detail |
---|
public boolean evaluate(Object item)
matches(Item)
returns true
.
evaluate
in interface Predicate
item
- some object
Predicate.evaluate(java.lang.Object)
protected boolean matches(Item item) throws RepositoryException
true
. Subclasses can override to implement something
useful that is dependant of the depth.
item
- the item to match
true
if the item matches; false
otherwise.
RepositoryException
- if an error occurs.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |