/** * This method evaluates whether the left operand is equal to the right operand. * * @access public * @static * @param IHashMap\Type $xs the left operand * @param Core\Type $ys the right operand * @return IBool\Type whether the left operand is equal * to the right operand */ public static function eq(IHashMap\Type $xs, Core\Type $ys) : IBool\Type { // == $type = $xs->__typeOf(); if ($ys !== null && $ys instanceof $type) { if (IInt32\Module::__eq($xs->size(), $ys->size())) { return IHashMap\Module::all($xs, function (ITuple\Type $x, IInt32\Type $i) use($ys) { $key = $x->first(); if ($ys->__hasKey($key)) { return $ys->item($key)->eq($x->second()); } return IBool\Type::false(); }); } } return IBool\Type::false(); }