Package org.projog.clp.math
Class Subtract
java.lang.Object
org.projog.clp.math.Subtract
- All Implemented Interfaces:
Expression
The difference of two
Expressions.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlonglongReturns aExpressionwithLeafExpressions in thisExpressionreplaced with values returned from the given function.setMax(ConstraintStore s, long max) setMin(ConstraintStore s, long min) toString()voidwalk(Consumer<Expression> r) Traverse this expression.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.projog.clp.Expression
setNot
-
Field Details
-
left
-
right
-
-
Constructor Details
-
Subtract
- Parameters:
left- the expression to subtractrightfromright- the expression to subtract fromleft
-
-
Method Details
-
getMin
- Specified by:
getMinin interfaceExpression
-
getMax
- Specified by:
getMaxin interfaceExpression
-
setMin
- Specified by:
setMinin interfaceExpression
-
setMax
- Specified by:
setMaxin interfaceExpression
-
walk
Description copied from interface:ExpressionTraverse this expression.If this expression is a composite then all its sub-expressions will be traversed.
- Specified by:
walkin interfaceExpression- Parameters:
r- will be called for eachExpressioncontained within thisExpression.
-
replace
Description copied from interface:ExpressionReturns aExpressionwithLeafExpressions in thisExpressionreplaced with values returned from the given function.- Specified by:
replacein interfaceExpression- Parameters:
r- returns theLeafExpressionto use as a replacement for theLeafExpressionit is called with, ornullif the originalLeafExpressionshould continue to be used.- Returns:
- a new
ExpressionwithLeafExpressions in thisExpressionreplaced with versions returned fromfunction.
-
toString
-