예제 #1
0
 /**
  * This method evaluates whether the left operand is identical to the right operand.
  *
  * @access public
  * @static
  * @param IObject\Type $x                                   the left operand
  * @param Core\Type $y                                      the right operand
  * @return IBool\Type                                       whether the left operand is identical
  *                                                          to the right operand
  */
 public static function id(IObject\Type $x, Core\Type $y) : IBool\Type
 {
     // ===
     if ($y !== null) {
         if ($x->__typeOf() === $y->__typeOf()) {
             return IBool\Type::box($x->unbox() === $y->unbox());
         }
     }
     return IBool\Type::false();
 }
예제 #2
0
 /**
  * This method evaluates whether the specified object is identical to the current object.
  *
  * @access public
  * @static
  * @param IString\Type $xs                                  the left operand
  * @param Core\Type $ys                                     the object to be evaluated
  * @return IBool\Type                                       whether the specified object is identical
  *                                                          to the current object
  */
 public static function id(IString\Type $xs, Core\Type $ys) : IBool\Type
 {
     if ($ys !== null) {
         if ($xs->__typeOf() === $ys->__typeOf()) {
             return IBool\Type::box($xs->unbox() === $ys->unbox());
         }
     }
     return IBool\Type::false();
 }
예제 #3
0
 /**
  * This method evaluates whether the left operand is identical to the right operand.
  *
  * @access public
  * @static
  * @param IInt32\Type $x                                    the left operand
  * @param Core\Type $y                                      the right operand
  * @return IBool\Type                                       whether the left operand is identical
  *                                                          to the right operand
  */
 public static function id(IInt32\Type $x, Core\Type $y) : IBool\Type
 {
     // ===
     if ($x->__typeOf() === $y->__typeOf()) {
         return IBool\Type::box($x->unbox() === $y->unbox());
     }
     return IBool\Type::false();
 }