Class Constraint

  • All Implemented Interfaces:
    IConstraint
    Direct Known Subclasses:
    BoundConstraint, LiteralConstraint

    public abstract class Constraint
    extends java.lang.Object
    implements IConstraint
    A constraint is a part of a condition. It restricts the allowed values via - a constant test (LiteralConstraint) - a predicate test (PredicateConstraint) - a constant test via a bound variable (BoundConstraint)
    • Field Detail

      • valuesource

        protected java.lang.Object valuesource
        The attribute or method.
      • operator

        protected IOperator operator
        The operator.
    • Constructor Detail

      • Constraint

        public Constraint​(java.lang.Object valuesource,
                          IOperator operator)
        Create a new constraint.
    • Method Detail

      • getValueSource

        public java.lang.Object getValueSource()
        Get the value source.
        Returns:
        The attribute or method.
      • getOperator

        public IOperator getOperator()
        Get the operator.
        Returns:
        The operator.
      • getVariablesForValueSource

        public static java.util.List getVariablesForValueSource​(java.lang.Object valuesource)
        Get the variables for a value source.
        Parameters:
        valuesource - The value source
        Returns:
        The variables.