public function equal($num)
    {
        self::mustBeNumeric($num, 'Test of equality');

        if(is_object($num)){
            return $this->value == $num->value;
        } else {
            return $this->value == $num;
        }
    }