/** * This method unsubscribes a listener. * * @access public * @static * @param IHashMap\Type $xs the left operand * @param ITuple\Type $entry a tuple containing the key and listener * @return IHashMap\Type the map */ public static function unsubscribe(IHashMap\Type $xs, ITuple\Type $entry) : IHashMap\Type { $k = $entry->first(); if ($xs->__hasKey($k)) { $ys = ILinkedList\Module::delete($xs->item($k), $entry->second()); $zs = IHashMap\Module::putEntry($xs, ITuple\Type::box2($k, $ys)); return $zs; } return $xs; }
/** * This method returns the numerically lowest value. * * @access public * @static * @param IHashMap\Type $xs the left operand * @param IHashMap\Type $ys the right operand * @return IHashMap\Type the minimum value */ public static function min(IHashMap\Type $xs, IHashMap\Type $ys) : IHashMap\Type { return IHashMap\Module::compare($xs, $ys)->unbox() <= 0 ? $xs : $ys; }