Class OverlapConstraint


  • public class OverlapConstraint
    extends Constraint
    Represents a constraint comparing two range values on an object.
    Author:
    Matthew Wakeling
    • Constructor Detail

      • OverlapConstraint

        public OverlapConstraint​(OverlapRange left,
                                 ConstraintOp op,
                                 OverlapRange right)
        Construct a constraint.
        Parameters:
        left - the left range
        op - the comparison operation
        right - the right range
        Throws:
        java.lang.IllegalArgumentException - if the comparison op is not valid
    • Method Detail

      • getLeft

        public OverlapRange getLeft()
        Returns the left OverlapRange.
        Returns:
        an OverlapRange object
      • getRight

        public OverlapRange getRight()
        Returns the right OverlapRange.
        Returns:
        an OverlapRange object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

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