Class Precondition.NumericComparisonPrecondition

  • Enclosing class:

    public static class Precondition.NumericComparisonPrecondition
    extends Precondition
    A numeric comparison precondition is used for patterns containing a predicate that compares some expression E with a numeric constant. The expression E is evaluated as a characteristic, so that in a set of rules with predicates that compare E against different numeric constants, the expression E is only evaluated once.
    • Constructor Detail

      • NumericComparisonPrecondition

        public NumericComparisonPrecondition​(Characteristic characteristic,
                                             long required)
    • Method Detail

      • testPrecondition

        protected boolean testPrecondition​(PreconditionMatcher matcher)
                                    throws XPathException
        Description copied from class: Precondition
        Compute the value of the precondition for a given item. The item in question is the context item in the dynamic context held in the PreconditionMatcher
        Specified by:
        testPrecondition in class Precondition
        matcher - the PreconditionMatcher: holds the dynamic context for evaluation.
        true if the precondition is satisfied
        XPathException - if evaluation of the precondition fails with a dynamic error
      • hashCode

        public int hashCode()
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        toString in class java.lang.Object