Class DepthPredicate

java.lang.Object
org.apache.jackrabbit.commons.predicate.DepthPredicate
All Implemented Interfaces:
Predicate
Direct Known Subclasses:
DeclaringTypePredicate, IsMandatoryPredicate, IsNodePredicate, NamePredicate, NodeTypePredicate

public class DepthPredicate extends Object implements Predicate
Implements a filter that filters item according to their (passed) depth.
  • Field Summary

    Fields inherited from interface org.apache.jackrabbit.commons.predicate.Predicate

    FALSE, TRUE
  • Constructor Summary

    Constructors
    Constructor
    Description
    DepthPredicate(int minDepth, int maxDepth)
    Creates a new depth filter for the given depths.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    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.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DepthPredicate

      public DepthPredicate(int minDepth, int maxDepth)
      Creates a new depth filter for the given depths.
      Parameters:
      minDepth - the minimal depth
      maxDepth - the maximal depth
  • Method Details

    • evaluate

      public 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.
      Specified by:
      evaluate in interface Predicate
      Parameters:
      item - some object
      Returns:
      predicate result
      See Also: