public function setOperands(OperandsCollection $operands)
    {
        // Check minimal operand count.
        $min = $this->getExpression()->getMinOperands();
        $given = count($operands);

        if ($given < $min) {
            $msg = "The Operator to be processed '" . get_class($this) . "' requires at least ${min} operand(s). ";
            $msg.= "${given} operand(s) given.";
            throw new OperatorProcessingException($msg, $this, OperatorProcessingException::NOT_ENOUGH_OPERANDS);
        }

        // Check maximal operand count.
        $max = $this->getExpression()->getMaxOperands();
        $given = count($operands);

        if ($max !== -1 && $given > $max) {
            $msg = "The Operator to be processed '" . get_class($this) . "' requires at most ${max} operand(s). ";
            $msg.= "${given} operand(s) given.";
            throw new OperatorProcessingException($msg, $this, OperatorProcessingException::TOO_MUCH_OPERANDS);
        }

        $this->operands = $operands;
    }