Class NotConstraint

  • All Implemented Interfaces:
    Constraint

    public class NotConstraint
    extends Object
    implements Constraint
    NotConstraint implements a NOT constraint.
    • Constructor Detail

      • NotConstraint

        public NotConstraint​(Constraint constraint)
        Creates a new NOT constraint with the given constraint as its operand.
        Parameters:
        constraint - the operand.
    • Method Detail

      • evaluate

        public boolean evaluate​(ScoreNode[] row,
                                Name[] selectorNames,
                                EvaluationContext context)
                         throws IOException
        Evaluates this constraint for the given row.
        Specified by:
        evaluate in interface Constraint
        Parameters:
        row - the current row of score nodes.
        selectorNames - the selector names associated with row.
        context - the evaluation context.
        Returns:
        true if the row satisfies the constraint, false otherwise.
        Throws:
        IOException - if an error occurs while evaluating the constraint.