Class Multiply

  • All Implemented Interfaces:
    Expression

    public final class Multiply
    extends java.lang.Object
    implements Expression
    The product of two Expressions.
    • Method Detail

      • setMax

        private static ExpressionResult setMax​(ConstraintStore s,
                                               Expression left,
                                               long max,
                                               long leftMax,
                                               long rightMin,
                                               long rightMax,
                                               java.util.function.BiFunction<java.lang.Long,​java.lang.Long,​java.lang.Long> f)
      • setMin

        private static ExpressionResult setMin​(ConstraintStore s,
                                               Expression left,
                                               long min,
                                               long leftMin,
                                               long rightMin,
                                               long rightMax,
                                               java.util.function.BiFunction<java.lang.Long,​java.lang.Long,​java.lang.Long> f)
      • divideRoundDown

        private static long divideRoundDown​(long dividend,
                                            long divisor)
      • divideWhole

        private static long divideWhole​(long dividend,
                                        long divisor)
      • walk

        public void walk​(java.util.function.Consumer<Expression> r)
        Description copied from interface: Expression
        Traverse this expression.

        If this expression is a composite then all its sub-expressions will be traversed.

        Specified by:
        walk in interface Expression
        Parameters:
        r - will be called for each Expression contained within this Expression.
      • replace

        public Multiply replace​(java.util.function.Function<LeafExpression,​LeafExpression> r)
        Description copied from interface: Expression
        Returns a Expression with LeafExpressions in this Expression replaced with values returned from the given function.
        Specified by:
        replace in interface Expression
        Parameters:
        r - returns the LeafExpression to use as a replacement for the LeafExpression it is called with, or null if the original LeafExpression should continue to be used.
        Returns:
        a new Expression with LeafExpressions in this Expression replaced with versions returned from function.
      • toString

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