Ejemplo n.º 1
0
 public function printMultiValueMap($map)
 {
     $lines = new _hx_array(array());
     if (null == $map) {
         throw new HException('null iterable');
     }
     $__hx__it = $map->keys();
     while ($__hx__it->hasNext()) {
         unset($key);
         $key = $__hx__it->next();
         $line = "" . _hx_string_or_null($key) . "=";
         $values = ufront_core__MultiValueMap_MultiValueMap_Impl_::getAll($map, $key);
         $values->sort(isset(Reflect::$compare) ? Reflect::$compare : array("Reflect", "compare"));
         $line .= _hx_string_or_null($values->join(","));
         $lines->push($line);
         unset($values, $line);
     }
     $lines->sort(isset(Reflect::$compare) ? Reflect::$compare : array("Reflect", "compare"));
     return $lines->join("\n");
 }
 static function combine($maps)
 {
     $qm = new haxe_ds_StringMap();
     $_g = 0;
     while ($_g < $maps->length) {
         $map = $maps[$_g];
         ++$_g;
         if (null == $map) {
             throw new HException('null iterable');
         }
         $__hx__it = $map->keys();
         while ($__hx__it->hasNext()) {
             unset($key);
             $key = $__hx__it->next();
             $_g1 = 0;
             $_g2 = ufront_core__MultiValueMap_MultiValueMap_Impl_::getAll($map, $key);
             while ($_g1 < $_g2->length) {
                 $val = $_g2[$_g1];
                 ++$_g1;
                 ufront_core__MultiValueMap_MultiValueMap_Impl_::add($qm, $key, $val);
                 unset($val);
             }
             unset($_g2, $_g1);
         }
         unset($map);
     }
     return $qm;
 }