Class RowPredicate

java.lang.Object
org.apache.jackrabbit.commons.predicate.RowPredicate
All Implemented Interfaces:
Predicate

public class RowPredicate extends Object implements Predicate
Predicate for checking whether a given object is a Row and optionally whether it contains a given selector. Subclasses can extend this class to provide more complex checking of the row or the selected node.
Since:
Apache Jackrabbit 2.2
  • Field Summary

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

    FALSE, TRUE
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a row predicate.
    RowPredicate(String selectorName)
    Creates a row predicate that checks the existence of the given selector (if given).
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    evaluate(Object object)
    Checks whether the given object is a Row and calls the protected evaluate(Row) method to evaluate the row.

    Methods inherited from class java.lang.Object

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

    • RowPredicate

      public RowPredicate(String selectorName)
      Creates a row predicate that checks the existence of the given selector (if given).
      Parameters:
      selectorName - selector name, or null
    • RowPredicate

      public RowPredicate()
      Creates a row predicate.
  • Method Details

    • evaluate

      public boolean evaluate(Object object)
      Checks whether the given object is a Row and calls the protected evaluate(Row) method to evaluate the row.
      Specified by:
      evaluate in interface Predicate
      Parameters:
      object - some object
      Returns:
      predicate result