public virtual void putAll(Map m)
 {
     for (Iterator it = m.keySet().iterator(); it.hasNext();)
     {
         object key = it.next();
         this.put(key, m.get(key));
     }
 }
Beispiel #2
0
 public static void forEach(Map @this, java.util.function.BiConsumer biconsumer)
 {
     java.util.Iterator i = @this.keySet().iterator();
     while (i.hasNext())
     {
         object key   = i.next();
         object value = @this.get(key);
         biconsumer.accept(key, value);
     }
 }
        public static Dictionary <K, V> ToDictionary <K, V>(this java.util.Map map)
        {
            var dict     = new Dictionary <K, V>();
            var iterator = map.keySet().iterator();

            while (iterator.hasNext())
            {
                var key = (K)iterator.next();
                dict.Add(key, (V)map.get(key));
            }
            return(dict);
        }