public class DepthPredicate extends Object implements Predicate
| Modifier and Type | Field and Description |
|---|---|
protected int |
maxDepth
The maximal depth
|
protected int |
minDepth
The minimal depth
|
| Constructor and Description |
|---|
DepthPredicate(int minDepth,
int maxDepth)
Creates a new depth filter for the given depths.
|
| Modifier and Type | Method and Description |
|---|---|
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(javax.jcr.Item item)
Returns
true. |
protected final int minDepth
protected final int maxDepth
public DepthPredicate(int minDepth,
int maxDepth)
minDepth - the minimal depthmaxDepth - the maximal depthpublic boolean evaluate(Object item)
matches(Item)
returns true.evaluate in interface Predicateitem - some objectPredicate.evaluate(java.lang.Object)protected boolean matches(javax.jcr.Item item)
throws javax.jcr.RepositoryException
true. Subclasses can override to implement something
useful that is dependant of the depth.item - the item to matchtrue if the item matches; false otherwise.javax.jcr.RepositoryException - if an error occurs.Copyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.