public static MapStream of()

in src/main/java/net/hydromatic/lambda/streams/MapStream.java [415:441]


    public static <K, V> MapStream<K, V> of(
        final Iterable<Map.Entry<K, V>> iterable) {
      return new AbstractMapStream<K, V>() {
        public Iterable<BiValue<K, V>> asIterable() {
          return new Iterable<BiValue<K, V>>() {
            final Iterator<Map.Entry<K, V>> x = iterable.iterator();

            public Iterator<BiValue<K, V>> iterator() {
              return new Iterator<BiValue<K, V>>() {
                public boolean hasNext() {
                  return x.hasNext();
                }

                public BiValue<K, V> next() {
                  Map.Entry<K, V> o = x.next();
                  return BiVal.of(o.getKey(), o.getValue());
                }

                public void remove() {
                  x.remove();
                }
              };
            }
          };
        }
      };
    }