/** * This method compares the operands for order. * * @access public * @static * @param IObject\Type $x the left operand * @param IObject\Type $y the right operand * @return ITrit\Type the order as to whether the left * operand is less than, equals to, * or greater than the right operand */ public static function compare(IObject\Type $x, IObject\Type $y) : ITrit\Type { $__x = $x->unbox(); $__y = $y->unbox(); if ($__x < $__y) { return ITrit\Type::negative(); } else { if ($__x == $__y) { return ITrit\Type::zero(); } else { return ITrit\Type::positive(); } } }