Class NamePredicate
- java.lang.Object
- 
- org.apache.jackrabbit.commons.predicate.DepthPredicate
- 
- org.apache.jackrabbit.commons.predicate.NamePredicate
 
 
- 
- All Implemented Interfaces:
- Predicate
 
 public class NamePredicate extends DepthPredicate Filters items according to their names.
- 
- 
Constructor SummaryConstructors Constructor Description NamePredicate(String name)Creates a new name filter with the given name.NamePredicate(String name, int minDepth, int maxDepth)Creates a new name filter with the given name and depths
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanmatches(Item item)Returnstrueif the name of the given item is equal to the configured name.- 
Methods inherited from class org.apache.jackrabbit.commons.predicate.DepthPredicateevaluate
 
- 
 
- 
- 
- 
Field Detail- 
nameprotected final String name The name to filter on
 
- 
 - 
Constructor Detail- 
NamePredicatepublic NamePredicate(String name, int minDepth, int maxDepth) Creates a new name filter with the given name and depths- Parameters:
- name- the name to filter on
- minDepth- the minimal depth
- maxDepth- the maximal depth
 
 - 
NamePredicatepublic NamePredicate(String name) Creates a new name filter with the given name.- Parameters:
- name- the name to filter on
 
 
- 
 - 
Method Detail- 
matchesprotected boolean matches(Item item) throws RepositoryException Returnstrueif the name of the given item is equal to the configured name.- Overrides:
- matchesin class- DepthPredicate
- Parameters:
- item- the item to match
- Returns:
- trueif the item matches;- falseotherwise.
- Throws:
- RepositoryException- if an error occurs.
- See Also:
- DepthPredicate.matches(javax.jcr.Item)
 
 
- 
 
-