Class LiteralConstraint

  • All Implemented Interfaces:
    IConstraint

    public class LiteralConstraint
    extends Constraint
    A literal contraint assures that an object field/method has the specified (return) value. LiteralConstraint assures that (slot|method(|var)
    • Field Detail

      • value

        protected java.lang.Object value
        The value to test against.
    • Constructor Detail

      • LiteralConstraint

        public LiteralConstraint​(java.lang.Object valuesource,
                                 java.lang.Object value)
        Create a new literal constraint.
      • LiteralConstraint

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

      • getValue

        public java.lang.Object getValue()
        Get the value.
        Returns:
        The value.
      • getVariables

        public java.util.List getVariables()
        Get the variables.
        Returns:
        The declared variables.
      • toString

        public java.lang.String toString()
        Get the string representation.
        Overrides:
        toString in class java.lang.Object
        Returns:
        The string representation.