changeset 6329:b7ca97bb737b

Remove MapStream and related classes
author briangoetz
date Thu, 18 Oct 2012 18:19:53 -0400
parents 4f626b53f908
children 4cabb2e857d4
files src/share/classes/java/util/Arrays.java src/share/classes/java/util/LinkedHashMap.java src/share/classes/java/util/Map.java src/share/classes/java/util/MapIterator.java src/share/classes/java/util/MapTraversable.java src/share/classes/java/util/SortedMap.java src/share/classes/java/util/streams/AbstractPipeline.java src/share/classes/java/util/streams/MapPipeline.java src/share/classes/java/util/streams/MapStream.java src/share/classes/java/util/streams/MapStreamAccessor.java src/share/classes/java/util/streams/ParallelPipelineHelper.java src/share/classes/java/util/streams/PipelineHelper.java src/share/classes/java/util/streams/Sink.java src/share/classes/java/util/streams/Stream.java src/share/classes/java/util/streams/StreamShape.java src/share/classes/java/util/streams/Streams.java src/share/classes/java/util/streams/TerminalSink.java src/share/classes/java/util/streams/ValuePipeline.java src/share/classes/java/util/streams/ops/BiFilterOp.java src/share/classes/java/util/streams/ops/BiMapOp.java src/share/classes/java/util/streams/ops/BiTeeOp.java src/share/classes/java/util/streams/ops/ConcatOp.java src/share/classes/java/util/streams/ops/CumulateOp.java src/share/classes/java/util/streams/ops/EvaluableOp.java src/share/classes/java/util/streams/ops/FilterOp.java src/share/classes/java/util/streams/ops/FindAnyOp.java src/share/classes/java/util/streams/ops/FindFirstOp.java src/share/classes/java/util/streams/ops/FlatMapOp.java src/share/classes/java/util/streams/ops/FoldOp.java src/share/classes/java/util/streams/ops/ForEachOp.java src/share/classes/java/util/streams/ops/GroupByOp.java src/share/classes/java/util/streams/ops/IntermediateOp.java src/share/classes/java/util/streams/ops/LimitOp.java src/share/classes/java/util/streams/ops/MapExtractKeysOp.java src/share/classes/java/util/streams/ops/MapExtractValuesOp.java src/share/classes/java/util/streams/ops/MapFilterKeysOp.java src/share/classes/java/util/streams/ops/MapFilterValuesOp.java src/share/classes/java/util/streams/ops/MapLimitOp.java src/share/classes/java/util/streams/ops/MapMapValuesOp.java src/share/classes/java/util/streams/ops/MapOp.java src/share/classes/java/util/streams/ops/MapSkipOp.java src/share/classes/java/util/streams/ops/MapSortedOp.java src/share/classes/java/util/streams/ops/MapSwapOp.java src/share/classes/java/util/streams/ops/MappedOp.java src/share/classes/java/util/streams/ops/MatchOp.java src/share/classes/java/util/streams/ops/NodeBuilder.java src/share/classes/java/util/streams/ops/Nodes.java src/share/classes/java/util/streams/ops/ReduceByOp.java src/share/classes/java/util/streams/ops/SeedlessFoldOp.java src/share/classes/java/util/streams/ops/SkipOp.java src/share/classes/java/util/streams/ops/SortedOp.java src/share/classes/java/util/streams/ops/StatefulOp.java src/share/classes/java/util/streams/ops/TeeOp.java src/share/classes/java/util/streams/ops/TreeUtils.java src/share/classes/java/util/streams/ops/UniqOp.java test-ng/tests/org/openjdk/tests/java/util/MapStreamTest.java test-ng/tests/org/openjdk/tests/java/util/streams/MapStreamTestDataProvider.java test-ng/tests/org/openjdk/tests/java/util/streams/ops/BiMatchOpTest.java test-ng/tests/org/openjdk/tests/java/util/streams/ops/ForEachOpTest.java test-ng/tests/org/openjdk/tests/java/util/streams/ops/MapExtractKeysOpTest.java test-ng/tests/org/openjdk/tests/java/util/streams/ops/MapExtractValuesOpTest.java test-ng/tests/org/openjdk/tests/java/util/streams/ops/StreamOpTestCase.java test-ng/tests/org/openjdk/tests/separate/SourceModel.java
diffstat 63 files changed, 84 insertions(+), 3110 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/java/util/Arrays.java	Thu Oct 18 13:02:45 2012 -0700
+++ b/src/share/classes/java/util/Arrays.java	Thu Oct 18 18:19:53 2012 -0400
@@ -3793,11 +3793,11 @@
         };
     }
 
-    public static<T> Sink<T, ?, ?> sink(T[] array) {
+    public static<T> Sink<T> sink(T[] array) {
         return sink(array, 0, array.length);
     }
 
-    public static<T> Sink<T, ?, ?> sink(T[] array, int offset, int length) {
+    public static<T> Sink<T> sink(T[] array, int offset, int length) {
         return new ArraySink<>(array, offset, length);
     }
 
--- a/src/share/classes/java/util/LinkedHashMap.java	Thu Oct 18 13:02:45 2012 -0700
+++ b/src/share/classes/java/util/LinkedHashMap.java	Thu Oct 18 18:19:53 2012 -0400
@@ -24,7 +24,6 @@
  */
 
 package java.util;
-import java.util.streams.MapStream;
 import java.util.streams.StreamOpFlags;
 import java.util.streams.Streams;
 
@@ -491,9 +490,4 @@
     protected boolean removeEldestEntry(Map.Entry<K,V> eldest) {
         return false;
     }
-
-    @Override
-    public MapStream<K,V> stream() {
-        return Streams.stream(this, StreamOpFlags.IS_ORDERED);
-    }
 }
--- a/src/share/classes/java/util/Map.java	Thu Oct 18 13:02:45 2012 -0700
+++ b/src/share/classes/java/util/Map.java	Thu Oct 18 18:19:53 2012 -0400
@@ -26,7 +26,6 @@
 package java.util;
 
 import java.util.functions.BiBlock;
-import java.util.streams.MapStream;
 import java.util.streams.Streamable;
 import java.util.streams.Streams;
 
@@ -119,7 +118,7 @@
  * @see Set
  * @since 1.2
  */
-public interface Map<K,V> extends Sized, Streamable<MapStream<K,V>>, MapTraversable<K,V>, MapStream.Destination<K,V> {
+public interface Map<K,V> extends Sized {
 
     // Query Operations
 
@@ -483,26 +482,8 @@
      */
     int hashCode();
 
-    @Override
-    MapIterator<K,V> iterator() default {
-        return new MapIterator.IteratorAdapter(entrySet().iterator());
-    }
-
-    @Override
     void forEach(BiBlock<? super K, ? super V> block) default {
         for (Map.Entry<K, V> entry : entrySet())
             block.apply(entry.getKey(), entry.getValue());
     }
-
-    @Override
-    MapStream<K,V> stream() default {
-        return Streams.stream(this);
-    }
-
-    @Override
-    void addAll(MapStream<? extends K, ? extends V> stream) default {
-        if (stream.isParallel())
-            stream = stream.sequential();
-        stream.forEach((BiBlock<K,V>) this::put);
-    }
 }
--- a/src/share/classes/java/util/MapIterator.java	Thu Oct 18 13:02:45 2012 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,217 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package java.util;
-
-/**
- * An {@link Iterator} extended to support key-value mappings.
- *
- * @param <K> Type of mapping key.
- * @param <V> Type of mapping value.
- *
- * @author Brian Goetz
- */
-public interface MapIterator<K, V> extends Iterator<Mapping<K,V>> {
-    /**
-     * Advance the iterator and return the current key.
-     *
-     * @return The current key after advancing the iterator or the first key.
-     */
-    K nextKey();
-
-    /**
-     * Advance the iterator and return the current value.
-     *
-     * @return The current key after advancing the iterator or the first key.
-     */
-    V nextValue();
-
-    /**
-     * Return the current key.
-     *
-     * @return the current key.
-     */
-    K curKey();
-
-    /**
-     * Return the current value;
-     *
-     * @return the current value.
-     */
-    V curValue();
-
-    /**
-     * Adapts a plain {@code Iterator<Mapping<K, V>>} to a {@code MapIterator<K,V>}.
-     *
-     * @param <K> Type of mapping key.
-     * @param <V> Type of mapping value.
-     */
-    public static class IteratorAdapter<K, V> implements MapIterator<K, V> {
-        protected Mapping<K, V> current;
-
-        protected final Iterator<? extends Mapping<K,V>> source;
-
-        protected IteratorAdapter(Iterator<? extends Mapping<K, V>> source) {
-            this.source = Objects.requireNonNull(source);
-        }
-
-        @Override
-        public boolean hasNext() {
-            return source.hasNext();
-        }
-
-        @Override
-        public Mapping<K, V> next() {
-            current = source.next();
-            return current;
-        }
-
-        @Override
-        public K nextKey() {
-            return next().getKey();
-        }
-
-        @Override
-        public V nextValue() {
-            return next().getValue();
-        }
-
-        @Override
-        public K curKey() {
-            if (null != current) {
-                return current.getKey();
-            } else {
-                throw new NoSuchElementException("No Current Element");
-            }
-        }
-
-        @Override
-        public V curValue() {
-            if (null != current) {
-                return current.getValue();
-            } else {
-                throw new NoSuchElementException("No Current Element");
-            }
-        }
-
-        /**
-         * Adapts a plain {@code Iterator<Mapping<K, V>>} to a {@code MapIterator<K,V>} if
-         * the former is not already an instance of the latter.
-         *
-         * @param source the source iterator to be adapted.
-         * @param <K> Type of mapping key.
-         * @param <V> Type of mapping value.
-         * @return the adapted iterator, otherwise the source itself if already an instance of {@code MapIterator<K, V>}.
-         */
-        public static <K, V> MapIterator<K, V> adapt(Iterator<? extends Mapping<K, V>> source) {
-            return (source instanceof MapIterator)
-                                   ? (MapIterator<K, V>) source
-                                   : new MapIterator.IteratorAdapter<>(source);
-        }
-    }
-
-    /**
-     * A MapIterator for filtering a {@code MapIterator<K,V>}.
-     *
-     * @param <K> Type of mapping key.
-     * @param <V> Type of mapping value.
-     */
-    public static class FilteredMapIterator<K, V> implements MapIterator<K, V> {
-
-        protected static final Object NO_CURRENT = new Object();
-        protected final MapIterator<K, V> source;
-        protected Object nextKey = NO_CURRENT;
-        protected Object nextValue;
-        protected Object currentKey = NO_CURRENT;
-        protected Object currentValue;
-
-        public FilteredMapIterator(MapIterator<K, V> source) {
-            this.source = Objects.requireNonNull(source);
-        }
-
-        @Override
-        public boolean hasNext() {
-            while ((NO_CURRENT == nextKey) && source.hasNext()) {
-                nextKey = source.nextKey();
-                nextValue = source.curValue();
-                /*
-                 if(!predicate.test(...)) {
-                    nextKey = nextValue = NO_CURRENT;
-                }
-                 */
-            }
-
-            return NO_CURRENT != nextKey;
-        }
-
-        protected void advance() {
-             if(!hasNext()) {
-                 throw new NoSuchElementException();
-            }
-
-            currentKey = nextKey;
-            currentValue = nextValue;
-            nextKey = nextValue = NO_CURRENT;
-        }
-
-        @Override
-        public Mapping<K, V> next() {
-            advance();
-
-            return new Mapping.MappingValue<>((K) currentKey, (V) currentValue);
-        }
-
-        @Override
-        public K nextKey() {
-            advance();
-
-            return (K) currentKey;
-        }
-
-        @Override
-        public V nextValue() {
-            advance();
-
-            return (V) currentValue;
-        }
-
-        @Override
-        public K curKey() {
-            if (NO_CURRENT == currentKey) {
-                throw new NoSuchElementException("No Current Element");
-            }
-
-            return (K) currentKey;
-        }
-
-        @Override
-        public V curValue() {
-            if (NO_CURRENT == currentKey) {
-                throw new NoSuchElementException("No Current Element");
-            }
-
-            return (V) currentValue;
-        }
-    }
-}
--- a/src/share/classes/java/util/MapTraversable.java	Thu Oct 18 13:02:45 2012 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package java.util;
-
-import java.util.functions.BiBlock;
-
-/**
- * Implementing this interface allows an object to indicate that it provides
- * the {@code forEach} method for internal iteration.
- *
- * @param <K> type keys of elements to be traversed.
- * @param <V> type values of elements to be traversed.
- *
- * @author Brian Goetz
- */
-public interface MapTraversable<K,V> {
-    /**
-     * Each element of the object will be provided to the specified Sink.
-     *
-     * @param block The Sink to which elements will be provided.
-     */
-    void forEach(BiBlock<? super K, ? super V> block);
-
-    MapIterator<K,V> iterator();
-}
--- a/src/share/classes/java/util/SortedMap.java	Thu Oct 18 13:02:45 2012 -0700
+++ b/src/share/classes/java/util/SortedMap.java	Thu Oct 18 18:19:53 2012 -0400
@@ -25,7 +25,6 @@
 
 package java.util;
 
-import java.util.streams.MapStream;
 import java.util.streams.StreamOpFlags;
 import java.util.streams.Streams;
 
@@ -285,9 +284,4 @@
      *         sorted in ascending key order
      */
     Set<Map.Entry<K, V>> entrySet();
-
-    @Override
-    MapStream<K,V> stream() default {
-        return Streams.stream(this, StreamOpFlags.IS_SORTED | StreamOpFlags.IS_ORDERED);
-    }
 }
--- a/src/share/classes/java/util/streams/AbstractPipeline.java	Thu Oct 18 13:02:45 2012 -0700
+++ b/src/share/classes/java/util/streams/AbstractPipeline.java	Thu Oct 18 18:19:53 2012 -0400
@@ -79,10 +79,6 @@
         return new ValuePipeline<>(this, op);
     }
 
-    protected<K, V> MapStream<K, V> chainMap(IntermediateOp<E_OUT, Mapping<K, V>> op) {
-        return new MapPipeline<>(this, op);
-    }
-
     protected<R> R evaluate(TerminalOp<E_OUT, R> terminal) {
         // @@@ If the source size estimate is small, don't bother going parallel
         if (source.isParallel()) {
@@ -113,8 +109,8 @@
                 Node<?> intermediateResult = evaluateParallel(accessor, ops, fromOp, upToOp, op);
                 // @@@ Inherit other flags from pipeline e.g. the intermediate result may be sorted and/or distinct,
                 //     and is ordered
-                accessor = new Streams.SpliteratorStreamAccessor(intermediateResult.spliterator(),
-                                                                 intermediateResult.size(), StreamOpFlags.IS_ORDERED);
+                accessor = new Streams.SpliteratorStreamAccessor<>(intermediateResult.spliterator(),
+                                                                   intermediateResult.size(), StreamOpFlags.IS_ORDERED);
 
                 fromOp = ++upToOp;
             }
@@ -131,11 +127,11 @@
 
     private <R> R evaluateParallel(StreamAccessor<?> source, IntermediateOp[] ops, int from, int to,
                                    TerminalOp<E_OUT, R> terminal) {
-        return (R) terminal.evaluateParallel(new ParallelImplPipelineHelper(source, ops, from, to));
+        return (R) terminal.evaluateParallel(new ParallelImplPipelineHelper<>(source, ops, from, to));
     }
 
     protected <R> R evaluateSerial(TerminalOp<E_OUT, R> terminal) {
-        return (R) terminal.evaluateSequential(new SequentialImplPipelineHelper(source, terminal));
+        return (R) terminal.evaluateSequential(new SequentialImplPipelineHelper<>(source, terminal));
     }
 
     static abstract class AbstractPipelineHelper<P_IN, P_OUT> implements PipelineHelper<P_IN, P_OUT> {
@@ -183,7 +179,7 @@
         }
 
         @Override
-        public Sink<P_IN, ?, ?> wrapSink(Sink sink) {
+        public Sink<P_IN> wrapSink(Sink sink) {
             Objects.requireNonNull(sink);
 
             for (int i = to - 1; i >= from; i--) {
@@ -220,7 +216,7 @@
         }
 
         @Override
-        public void wrapInto(Sink<E_OUT, ?, ?> sink) {
+        public void wrapInto(Sink<E_OUT> sink) {
             Objects.requireNonNull(sink);
 
             // @@@ Need to check if any upstream streams have been pulled using iterator
--- a/src/share/classes/java/util/streams/MapPipeline.java	Thu Oct 18 13:02:45 2012 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,186 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package java.util.streams;
-
-import java.util.*;
-import java.util.functions.*;
-import java.util.streams.ops.*;
-
-/**
- * MapPipeline
- *
- * @param <U> Type of elements in the upstream.
- * @param <K> Type of mapping key.
- * @param <V> Type of mapping value.
- *
- * @author Brian Goetz
- */
-public class MapPipeline<U, K, V>
-        extends AbstractPipeline<U, Mapping<K,V>>
-        implements MapStream<K, V> {
-    /**
-     * If initialized then we are committed to pull iteration via iterator.
-     */
-    private MapIterator<K,V> iterator;
-
-    public MapPipeline(MapStreamAccessor<K, V> source) {
-        super(source);
-        assert source.getShape() == StreamShape.KEY_VALUE;
-    }
-
-    public MapPipeline(AbstractPipeline<?, U> upstream, IntermediateOp<U, Mapping<K, V>> op) {
-        super(upstream, op);
-    }
-
-    @Override
-    public MapIterator<K, V> iterator() {
-        if (iterator == null) {
-            Iterator<Mapping<K, V>> wrapped = (op == null)
-                                              ? ((MapStreamAccessor<K, V>) source)
-                                              : op.wrapIterator(upstream.iterator());
-            iterator = MapIterator.IteratorAdapter.adapt(wrapped);
-        }
-        return iterator;
-    }
-
-    @Override
-    public void forEach(BiBlock<? super K, ? super V> sink) {
-        pipeline(ForEachOp.make(sink));
-    }
-
-    @Override
-    public <A extends Destination<K, V>> A into(A target) {
-        target.addAll(this);
-        return target;
-    }
-
-    @Override
-    public MapStream<K, V> tee(BiBlock<? super K, ? super V> block) {
-        return chainMap(new BiTeeOp<>(block));
-    }
-
-    @Override
-    public MapStream<K, V> limit(int n) {
-        return chainMap(new MapLimitOp<K, V>(n));
-    }
-
-    @Override
-    public MapStream<K, V> skip(int n) {
-        return chainMap(new MapSkipOp<K, V>(n));
-    }
-
-    @Override
-    public MapStream<K, V> concat(MapStream<K, V> other) {
-        return chainMap(ConcatOp.<K, V>makeMap(other));
-    }
-
-    @Override
-    public Stream<K> keys() {
-        return chainValue(new MapExtractKeysOp<K,V>());
-    }
-
-    @Override
-    public Stream<V> values() {
-        return chainValue(new MapExtractValuesOp<K,V>());
-    }
-
-    @Override
-    public MapStream<K, V> filter(BiPredicate<? super K, ? super V> predicate) {
-        return chainMap(new BiFilterOp<>(predicate));
-    }
-
-    @Override
-    public MapStream<K, V> filterKeys(Predicate<? super K> predicate) {
-        return chainMap(new MapFilterKeysOp<K, V>(predicate));
-    }
-
-    @Override
-    public MapStream<K, V> filterValues(Predicate<? super V> predicate) {
-        return chainMap(new MapFilterValuesOp<K, V>(predicate));
-    }
-
-    @Override
-    public <U> MapStream<K, U> mapValues(BiMapper<? super K, ? super V, ? extends U> mapper) {
-        return chainMap(new BiMapOp<>(mapper));
-    }
-
-    @Override
-    public <U> MapStream<K, U> mapValues(Mapper<? super V, ? extends U> mapper) {
-        return chainMap(new MapMapValuesOp<K, V, U>(mapper));
-    }
-
-    @Override
-    public MapStream<V, K> swap() {
-        return chainMap(MapSwapOp.<K, V>singleton());
-    }
-
-    @Override
-    public MapStream<K, V> sorted(Comparator<? super K> comparator) {
-//        return chainWith(new MapSortedOp<K,V>(comparator));
-        return null;
-    }
-
-    @Override
-    public MapStream<K, V> mergeWith(MapStream<K, ? extends V> other) {
-        // !?! mduigou I don't know what semantic was intended.
-        throw new UnsupportedOperationException("nyi");
-    }
-
-    @Override
-    public boolean noneMatch(BiPredicate<? super K, ? super V> predicate) {
-        return pipeline(MatchOp.make(predicate, MatchOp.MatchKind.NONE));
-    }
-
-    @Override
-    public boolean allMatch(BiPredicate<? super K, ? super V> predicate) {
-        return pipeline(MatchOp.make(predicate, MatchOp.MatchKind.ALL));
-    }
-
-    @Override
-    public boolean anyMatch(BiPredicate<? super K, ? super V> predicate) {
-        return pipeline(MatchOp.make(predicate, MatchOp.MatchKind.ANY));
-    }
-
-    @Override
-    public Optional<Mapping<K, V>> findAny() {
-        return pipeline(FindAnyOp.<Mapping<K,V>>singleton());
-    }
-
-    @Override
-    public Optional<Mapping<K, V>> findFirst() {
-        return pipeline(FindFirstOp.<Mapping<K,V>>singleton());
-    }
-
-    @Override
-    public MapStream<K,V> sequential() {
-        if (!isParallel()) {
-            return this;
-        }
-        else {
-            throw new UnsupportedOperationException("nyi");
-        }
-    }
-
-}
--- a/src/share/classes/java/util/streams/MapStream.java	Thu Oct 18 13:02:45 2012 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,232 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package java.util.streams;
-
-import java.util.*;
-import java.util.functions.*;
-
-/**
- * A sequence of elements each of which is a key value mapping. A stream is a
- * consumable data structure. The elements of the stream are available for
- * consumption by either iteration or an operation. Once consumed the elements
- * are no longer available from the stream.
- *
- * @param <K> Type of mapping key.
- * @param <V> Type of mapping value.
- *
- * @author Brian Goetz
- */
-public interface MapStream<K, V> extends BaseStream<Mapping<K, V>, MapIterator<K, V>> {
-
-    /**
-     * Return the mapping which is semantically "first" in the stream. If the
-     * stream is not ordered then repeated invocations may return a different
-     * mapping.
-     *
-     * @return the first mapping of the stream if any.
-     */
-    Optional<Mapping<K, V>> findFirst();
-
-    /**
-     * Return any mapping in the stream. Repeated invocations may return the
-     * same mapping or a different mapping.
-     *
-     * @return a mapping in the stream.
-     */
-    Optional<Mapping<K, V>> findAny();
-
-    /**
-     * Return a stream of the keys.
-     *
-     * @return a stream of the keys.
-     */
-    Stream<K> keys();
-
-    /**
-     * Return a stream of the values.
-     *
-     * @return a stream of the values.
-     */
-    Stream<V> values();
-
-    /**
-     * Return a stream filtered by the provided predicate.
-     *
-     * @param predicate the predicate used to filter elements.
-     * @return The filtered stream.
-     */
-    MapStream<K, V> filter(BiPredicate<? super K, ? super V> predicate);
-
-    /**
-     * Return a stream filtered by the provided predicate.
-     *
-     * @param predicate the predicate used to filter elements based upon keys.
-     * @return The filtered stream.
-     */
-    MapStream<K, V> filterKeys(Predicate<? super K> predicate);
-
-    /**
-     * Return a stream filtered by the provided predicate.
-     *
-     * @param predicate the predicate used to filter elements based upon values.
-     * @return The filtered stream.
-     */
-    MapStream<K, V> filterValues(Predicate<? super V> predicate);
-
-    /**
-     * Return a MapStream where the values have been mapped via the provided
-     * Mapper.
-     *
-     * @param <U> Type of mapping values in the returned stream.
-     * @param mapper the predicate used to map elements.
-     * @return The mapped stream.
-     */
-    <U> MapStream<K, U> mapValues(BiMapper<? super K, ? super V, ? extends U> mapper);
-
-    /**
-     * Return a MapStream where the values have been mapped via the provided
-     * Mapper.
-     *
-     * @param <U> Type of mapping values in the returned stream.
-     * @param mapper the predicate used to map elements.
-     * @return The mapped stream.
-     */
-    <U> MapStream<K, U> mapValues(Mapper<? super V, ? extends U> mapper);
-
-    /**
-     * Each element of this stream is processed by the provided sink.
-     *
-     * @param sink the Sink via which all elements will be processed.
-     */
-    void forEach(BiBlock<? super K, ? super V> sink);
-
-    /**
-     * Each element of this stream is processed by the provided sink.
-     *
-     * @param block the Sink via which all elements will be processed.
-     */
-    MapStream<K, V> tee(BiBlock<? super K, ? super V> block);
-
-    /**
-     * Limit this stream to at most <code><n/code> elements. The stream will not be affected
-     * if it contains less than or equal to <code><n/code> elements.
-     *
-     * @param n the number elements the stream should be limited to.
-     * @return the limited stream.
-     */
-    MapStream<K, V> limit(int n);
-
-    /**
-     * Skip at most <code>n</code> elements.
-     *
-     * @param n the number of elements to be skipped.
-     * @return the skipped stream.
-     */
-    MapStream<K, V> skip(int n);
-
-    /**
-     * Concatenate to the end of this stream.
-     * @@@ What about mergeWith?
-     *
-     * @param other the stream to concatenate.
-     * @return the concatenated stream.
-     */
-    MapStream<K, V> concat(MapStream<K, V> other);
-
-    <A extends MapStream.Destination<K, V>> A into(A target);
-
-    /**
-     * Any of the elements of this map stream return {@code true} for the
-     * provided predicate.
-     *
-     * @param predicate The predicate against which elements will be evaluated.
-     * @return {@code true} if any of the elements return {@code true} for the
-     * provided predicate.
-     */
-    boolean anyMatch(BiPredicate<? super K, ? super V> predicate);
-
-    /**
-     * all of the elements of this map stream return {@code true} for the
-     * provided predicate.
-     *
-     * @param predicate The predicate against which elements will be evaluated.
-     * @return {@code true} if all of the elements return {@code true} for the
-     * provided predicate.
-     */
-    boolean allMatch(BiPredicate<? super K, ? super V> predicate);
-
-    /**
-     * None of the elements of this map stream return {@code true} for the
-     * provided predicate.
-     *
-     * @param predicate The predicate against which elements will be evaluated.
-     * @return {@code true} if none of the elements return {@code true} for the
-     * provided predicate.
-     */
-    boolean noneMatch(BiPredicate<? super K, ? super V> predicate);
-
-    /**
-     * Returns a stream composed of the elements o
-     *
-     * ?!? mduigou Intended semantic for handling duplicates? Is concatenation a
-     * valid implementation?
-     *
-     * @param other
-     * @return
-     */
-    MapStream<K, V> mergeWith(MapStream<K, ? extends V> other);
-
-    /**
-     * Returns a map stream containing the same elements sorted in the order
-     * specified by the provided Comparator.
-     *
-     * @param comparator used to evaluate elements to determine their sorted
-     * order.
-     * @return a map stream containing the same elements sorted in the order
-     * specified by the provided Comparator.
-     */
-    MapStream<K, V> sorted(Comparator<? super K> comparator);
-
-    /**
-     * Return a map stream which contains the same elements as this stream but
-     * the keys and values have been swapped.
-     *
-     * @return A map stream which contains the same elements as this stream but
-     * the keys and values have been swapped.
-     */
-    MapStream<V, K> swap();
-
-    MapStream<K, V> sequential();
-
-    /**
-     * An aggregate that supports an {@code add(T)} operation.
-     *
-     * @param <K> Type of aggregate elements.
-     * @param <V> Type of aggregate elements.
-     */
-    interface Destination<K,V> {
-        public void addAll(MapStream<? extends K, ? extends V> stream);
-    }
-}
--- a/src/share/classes/java/util/streams/MapStreamAccessor.java	Thu Oct 18 13:02:45 2012 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package java.util.streams;
-
-import java.util.MapIterator;
-import java.util.Mapping;
-import java.util.functions.BiBlock;
-
-/**
- * MapStreamAccessor
- *
- * @param <K> Type of element keys.
- * @param <V> Type of element values.
- *
- * @author Brian Goetz
- */
-public interface MapStreamAccessor<K, V> extends StreamAccessor<Mapping<K, V>>, MapIterator<K, V> {
-
-    void forEach(BiBlock<? super K, ? super V> sink);
-
-    @Override
-    StreamShape getShape() default {
-        return StreamShape.KEY_VALUE;
-    }
-
-    public interface ForSequential<K, V> extends MapStreamAccessor<K, V> {
-
-        @Override
-        public boolean isParallel() default {
-            return false;
-        }
-
-        @Override
-        public Spliterator<Mapping<K, V>> spliterator() default {
-            throw new UnsupportedOperationException();
-        }
-
-        @Override
-        public int getStreamFlags() default {
-            return 0;
-        }
-    }
-}
--- a/src/share/classes/java/util/streams/ParallelPipelineHelper.java	Thu Oct 18 13:02:45 2012 -0700
+++ b/src/share/classes/java/util/streams/ParallelPipelineHelper.java	Thu Oct 18 18:19:53 2012 -0400
@@ -50,7 +50,7 @@
      * @param sp   the source of elements to push into the wrapped sink.
      * @param sink the sink in which to wrap.
      */
-    void wrapInto(Spliterator<P_IN> sp, Sink<P_OUT, ?, ?> sink) default {
+    void wrapInto(Spliterator<P_IN> sp, Sink<P_OUT> sink) default {
         into(sp, wrapSink(sink));
     }
 
@@ -60,7 +60,7 @@
      * @param sp   the source of elements to push into the sink
      * @param sink the sink that accepts elements.
      */
-    void into(Spliterator<P_IN> sp, Sink<P_IN, ?, ?> sink) default {
+    void into(Spliterator<P_IN> sp, Sink<P_IN> sink) default {
         sink.begin(sp.getSizeIfKnown());
         sp.forEach(sink);
         sink.end();
--- a/src/share/classes/java/util/streams/PipelineHelper.java	Thu Oct 18 13:02:45 2012 -0700
+++ b/src/share/classes/java/util/streams/PipelineHelper.java	Thu Oct 18 18:19:53 2012 -0400
@@ -59,8 +59,8 @@
      *
      * @param sink the sink in which to wrap.
      */
-    void wrapInto(Sink<P_OUT, ?, ?> sink) default {
-        Sink<P_IN, ?, ?> wrappedSink = wrapSink(sink);
+    void wrapInto(Sink<P_OUT> sink) default {
+        Sink<P_IN> wrappedSink = wrapSink(sink);
         StreamAccessor<P_IN> source = getStreamAccessor();
         wrappedSink.begin(source.estimateSize());
         source.forEach(wrappedSink);
@@ -73,7 +73,7 @@
      * @param sink the last sink in the chain that accepts output elements.
      * @return the first sink in the chain that accepts input elements.
      */
-    Sink<P_IN, ?, ?> wrapSink(Sink<P_OUT, ?, ?> sink);
+    Sink<P_IN> wrapSink(Sink<P_OUT> sink);
 
     /**
      * Create an iterator chain.
--- a/src/share/classes/java/util/streams/Sink.java	Thu Oct 18 13:02:45 2012 -0700
+++ b/src/share/classes/java/util/streams/Sink.java	Thu Oct 18 18:19:53 2012 -0400
@@ -34,16 +34,12 @@
  * Sink
  *
  * @param <T> Type of elements for value streams.
- * @param <K> Type of element keys for map streams.
- * @param <V> Type of element values for map streams.
  *
  * @author Brian Goetz
  */
-public interface Sink<T, K, V> extends Block<T>, BiBlock<K,V> {
+public interface Sink<T> extends Block<T> {
     void accept(T t);
 
-    void accept(K k, V v) default { throw new IllegalStateException(); }
-
     /**
      * Reset the sink state to receive a fresh data set. This is used when a
      * Sink is being reused by multiple calculations.
@@ -61,10 +57,7 @@
     @Override
     void apply(T t) default { accept(t); }
 
-    @Override
-    void apply(K k, V v) default { accept(k, v); }
-
-    public interface OfValue<T> extends Sink<T, Object, Object> {
+    public interface OfValue<T> extends Sink<T> {
         @Override
         void begin(int size) default {}
     }
@@ -86,54 +79,4 @@
             downstream.end();
         }
     }
-
-    public interface OfMap<K, V> extends Sink<Mapping<K, V>, K, V> {
-        @Override
-        void accept(Mapping<K, V> mapping) default {
-            // @@@ Temporary sanity check -- probably should throw ISE here
-            Logger.getLogger(Sink.class.getName()).warning("Someone called accept(Mapping)");
-            accept(mapping.getKey(), mapping.getValue());
-        }
-
-        @Override
-        void accept(K k, V v);
-    }
-
-    public static abstract class ChainedMap<K,V> implements OfMap<K,V> {
-        protected final Sink downstream;
-
-        public ChainedMap(Sink downstream) {
-            this.downstream = Objects.requireNonNull(downstream);
-        }
-
-        @Override
-        public void begin(int size) {
-            downstream.begin(size);
-        }
-
-        @Override
-        public void end() {
-            downstream.end();
-        }
-    }
-
-    public static class ChainedMapAdapter<K, V> extends ChainedMap<K, V> {
-        public ChainedMapAdapter(ChainedValue<? extends Mapping<K, V>> downstream) {
-            super(downstream);
-        }
-
-        @Override
-        public void accept(Mapping<K, V> e) {
-            downstream.accept(e);
-        }
-
-        @Override
-        public void accept(K k, V v) {
-            downstream.accept(new Mapping.MappingValue<>(k, v));
-        }
-
-        public static <K, V> ChainedMap adapt(ChainedValue<? extends Mapping<K, V>> sink) {
-            return new ChainedMapAdapter<K, V>(sink);
-        }
-    }
 }
--- a/src/share/classes/java/util/streams/Stream.java	Thu Oct 18 13:02:45 2012 -0700
+++ b/src/share/classes/java/util/streams/Stream.java	Thu Oct 18 18:19:53 2012 -0400
@@ -115,8 +115,6 @@
 
     Stream<T> sequential();
 
-    <U> MapStream<T, U> mapped(Mapper<? super T, ? extends U> mapper);
-
 
     /**
      * An aggregate that supports an {@code addAll(Stream)} operation.
--- a/src/share/classes/java/util/streams/StreamShape.java	Thu Oct 18 13:02:45 2012 -0700
+++ b/src/share/classes/java/util/streams/StreamShape.java	Thu Oct 18 18:19:53 2012 -0400
@@ -37,12 +37,6 @@
         <U, V> AbstractPipeline<U, V> chain(AbstractPipeline<?, U> upstream, IntermediateOp<U, V> op) {
             return new ValuePipeline<>(upstream, op);
         }
-    },
-    KEY_VALUE {
-        @Override
-        <U, V> AbstractPipeline<U, V> chain(AbstractPipeline<?, U> upstream, IntermediateOp<U, V> op) {
-            return new MapPipeline(upstream, op);
-        }
     };
 
     abstract<U, V> AbstractPipeline<U, V> chain(AbstractPipeline<?, U> upstream, IntermediateOp<U, V> op);
--- a/src/share/classes/java/util/streams/Streams.java	Thu Oct 18 13:02:45 2012 -0700
+++ b/src/share/classes/java/util/streams/Streams.java	Thu Oct 18 18:19:53 2012 -0400
@@ -25,7 +25,6 @@
 package java.util.streams;
 
 import java.util.*;
-import java.util.functions.BiBlock;
 import java.util.functions.Block;
 import java.util.functions.Factory;
 import java.util.functions.UnaryOperator;
@@ -40,28 +39,6 @@
         throw new Error("no instances");
     }
 
-    // MapStream
-
-    public static<K,V> MapStream<K,V> stream(Map<K,V> source) {
-        return new MapPipeline<>(new MapTraversableMapStreamAccessor<>(source, source.size(), StreamOpFlags.IS_DISTINCT));
-    }
-
-    public static<K,V> MapStream<K,V> stream(Map<K,V> source, int flags) {
-        return new MapPipeline<>(new MapTraversableMapStreamAccessor<>(source, source.size(), StreamOpFlags.IS_DISTINCT | flags));
-    }
-
-    public static<K,V> MapStream<K,V> stream(MapTraversable<K,V> source) {
-        return new MapPipeline<>(new MapTraversableMapStreamAccessor<>(source));
-    }
-
-    public static<K,V> MapStream<K,V> stream(MapTraversable<K,V> source, int sizeOrUnknown) {
-        return new MapPipeline<>(new MapTraversableMapStreamAccessor<>(source, sizeOrUnknown));
-    }
-
-    public static<K,V> MapStream<K,V> stream(MapTraversable<K,V> source, int sizeOrUnknown, int flags) {
-        return new MapPipeline<>(new MapTraversableMapStreamAccessor<>(source, sizeOrUnknown, flags));
-    }
-
     // Stream
 
     public static<T> Stream<T> stream(Collection<T> source) {
@@ -535,96 +512,6 @@
         }
     }
 
-    private static class MapTraversableMapStreamAccessor<K,V>
-            implements MapStreamAccessor.ForSequential<K,V> {
-        private final MapTraversable<K,V> traversable;
-        private final int flags;
-        private final int sizeOrUnknown;
-        MapIterator<K,V> iterator = null;
-
-        MapTraversableMapStreamAccessor(MapTraversable<K,V> traversable) {
-            this(traversable, -1, 0);
-        }
-
-        MapTraversableMapStreamAccessor(MapTraversable<K,V> traversable, int sizeOrUnknown) {
-            this(traversable, sizeOrUnknown, 0);
-        }
-
-        MapTraversableMapStreamAccessor(MapTraversable<K,V> traversable, int sizeOrUnknown, int flags) {
-            this.traversable = traversable;
-            this.flags = (sizeOrUnknown >= 0 ? StreamOpFlags.IS_SIZED : 0) |
-                         (flags & (StreamOpFlags.IS_DISTINCT | StreamOpFlags.IS_SORTED | StreamOpFlags.IS_ORDERED));
-            this.sizeOrUnknown = sizeOrUnknown;
-        }
-
-        @Override
-        public MapIterator<K,V> iterator() {
-            if (iterator == null) {
-                iterator = traversable.iterator();
-            }
-            return iterator;
-        }
-
-        @Override
-        public void forEach(Block<Mapping<K, V>> sink) {
-            // @@@ Need to transfer Block into BiBlock
-            forEach((BiBlock<? super K,? super V> ) sink);
-        }
-
-        @Override
-        public void forEach(final BiBlock<? super K,? super V> block) {
-            if (iterator == null) {
-                traversable.forEach(block);
-                // @@@ Collections.emptyMapIterator ?
-                iterator = MapIterator.IteratorAdapter.adapt(Collections.<Mapping<K,V>>emptyIterator());
-            } else {
-                while (iterator.hasNext()) {
-                    block.apply(iterator.nextKey(), iterator.curValue());
-                }
-            }
-        }
-
-        @Override
-        public Mapping<K,V> next() {
-            return iterator().next();
-        }
-
-        @Override
-        public boolean hasNext() {
-            return iterator().hasNext();
-        }
-
-        @Override
-        public int getStreamFlags() {
-            return flags;
-        }
-
-        @Override
-        public int getSizeIfKnown() {
-            return sizeOrUnknown;
-        }
-
-        @Override
-        public K nextKey() {
-            return iterator().nextKey();
-        }
-
-        @Override
-        public V nextValue() {
-            return iterator().nextValue();
-        }
-
-        @Override
-        public K curKey() {
-            return iterator().curKey();
-        }
-
-        @Override
-        public V curValue() {
-            return iterator().curValue();
-        }
-    }
-
     private abstract static class RandomAccessIterator<T> implements Iterator<T> {
         protected final int endOffset;
         protected int offset;
--- a/src/share/classes/java/util/streams/TerminalSink.java	Thu Oct 18 13:02:45 2012 -0700
+++ b/src/share/classes/java/util/streams/TerminalSink.java	Thu Oct 18 18:19:53 2012 -0400
@@ -33,7 +33,7 @@
  *
  * @author Brian Goetz
  */
-public interface TerminalSink<T, R> extends Sink<T, Object, Object> {
+public interface TerminalSink<T, R> extends Sink<T> {
 
     /**
      * @@@ consider removing default
--- a/src/share/classes/java/util/streams/ValuePipeline.java	Thu Oct 18 13:02:45 2012 -0700
+++ b/src/share/classes/java/util/streams/ValuePipeline.java	Thu Oct 18 18:19:53 2012 -0400
@@ -170,11 +170,6 @@
     }
 
     @Override
-    public <R> MapStream<U, R> mapped(Mapper<? super U, ? extends R> mapper) {
-        return chainMap(new MappedOp<>(mapper));
-    }
-
-    @Override
     public U reduce(final U seed, final BinaryOperator<U> op) {
         return pipeline(new FoldOp<>(seed, op, op));
     }
--- a/src/share/classes/java/util/streams/ops/BiFilterOp.java	Thu Oct 18 13:02:45 2012 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,103 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package java.util.streams.ops;
-
-import java.util.*;
-import java.util.functions.BiPredicate;
-import java.util.streams.Sink;
-import java.util.streams.StreamOpFlags;
-import java.util.streams.StreamShape;
-
-/**
- * Filter using a BiPredicate.
- */
-public class BiFilterOp<K, V> implements IntermediateOp<Mapping<K, V>, Mapping<K, V>> {
-
-    public final BiPredicate<? super K, ? super V> predicate;
-
-    public BiFilterOp(BiPredicate<? super K, ? super V> predicate) {
-        this.predicate = Objects.requireNonNull(predicate);
-    }
-
-    @Override
-    public int getOpFlags() {
-        return StreamOpFlags.NOT_SIZED;
-    }
-
-    @Override
-    public StreamShape inputShape() {
-        return StreamShape.KEY_VALUE;
-    }
-
-    @Override
-    public StreamShape outputShape() {
-        return StreamShape.KEY_VALUE;
-    }
-
-    @Override
-    public Iterator<Mapping<K, V>> wrapIterator(Iterator<Mapping<K, V>> source) {
-        return new BiFilteredMapIterator<>(MapIterator.IteratorAdapter.adapt(source), predicate);
-    }
-
-    @Override
-    public Sink<Mapping<K, V>, K, V> wrapSink(Sink sink) {
-        return new Sink.ChainedMap<K, V>(sink) {
-            @Override
-            public void accept(K k, V v) {
-                if (predicate.test(k, v)) {
-                    downstream.accept(k, v);
-                }
-            }
-        };
-    }
-
-    public static <K, V> MapIterator<K, V> iterator(MapIterator<K, V> source, BiPredicate<? super K, ? super V> predicate) {
-        return new BiFilteredMapIterator<>(source, predicate);
-    }
-
-    private static class BiFilteredMapIterator<K, V> extends MapIterator.FilteredMapIterator<K, V> {
-
-        private final BiPredicate<? super K, ? super V> predicate;
-
-        public BiFilteredMapIterator(MapIterator<K, V> source,
-                BiPredicate<? super K, ? super V> predicate) {
-            super(source);
-            this.predicate = Objects.requireNonNull(predicate);
-        }
-
-        @Override
-        public boolean hasNext() {
-            while ((NO_CURRENT == nextKey) && source.hasNext()) {
-                nextKey = source.nextKey();
-                nextValue = source.curValue();
-                if(!predicate.test((K)nextKey, (V)nextValue)) {
-                    nextKey = nextValue = NO_CURRENT;
-                }
-            }
-
-            return NO_CURRENT != nextKey;
-        }
-    }
-}
--- a/src/share/classes/java/util/streams/ops/BiMapOp.java	Thu Oct 18 13:02:45 2012 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,153 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package java.util.streams.ops;
-
-import java.util.Iterator;
-import java.util.MapIterator;
-import java.util.Mapping;
-import java.util.NoSuchElementException;
-import java.util.Objects;
-import java.util.functions.BiMapper;
-import java.util.streams.Sink;
-import java.util.streams.StreamOpFlags;
-import java.util.streams.StreamShape;
-
-/**
- * A mapping operation utilizing a BiMapper.
- * <p/>
- * @param <K> Type of mapping keys.
- * @param <V> Type of input mapping values.
- * @param <U> Type of output mapping values.
- */
-public class BiMapOp<K, V, U> implements IntermediateOp<Mapping<K, V>, Mapping<K, U>> {
-
-    /**
-     * Mapping for this operation.
-     */
-    public final BiMapper<? super K, ? super V, ? extends U> mapper;
-
-    public BiMapOp(BiMapper<? super K, ? super V, ? extends U> mapper) {
-        this.mapper = Objects.requireNonNull(mapper);
-    }
-
-    @Override
-    public int getOpFlags() {
-        return StreamOpFlags.NOT_SORTED | StreamOpFlags.NOT_DISTINCT;
-    }
-
-    @Override
-    public StreamShape inputShape() {
-        return StreamShape.KEY_VALUE;
-    }
-
-    @Override
-    public StreamShape outputShape() {
-        return StreamShape.KEY_VALUE;
-    }
-
-    @Override
-    public MapIterator<K, U> wrapIterator(final Iterator<Mapping<K, V>> source) {
-        return iterator(MapIterator.IteratorAdapter.adapt(source), mapper);
-    }
-
-    public MapIterator<K, U> wrapIterator(final MapIterator<K, V> source) {
-        return iterator(source, mapper);
-    }
-
-    @Override
-    public Sink<Mapping<K, V>, K, V> wrapSink(Sink sink) {
-        return new Sink.ChainedMap<K, V>(sink) {
-            @Override
-            public void accept(K k, V v) {
-                downstream.accept(k, mapper.map(k, v));
-            }
-        };
-    }
-
-    public static <K, V, VV> MapIterator<K, VV> iterator(MapIterator<K, V> source,
-            BiMapper<? super K, ? super V, ? extends VV> mapper) {
-
-        return new MappedMapIterator<>(source, mapper);
-    }
-
-    private static class MappedMapIterator<K, V, VV> implements MapIterator<K, VV> {
-
-        private static final Object NO_CURRENT = new Object();
-        private final MapIterator<K, V> source;
-        private final BiMapper<? super K, ? super V, ? extends VV> mapper;
-        Object currentKey = NO_CURRENT;
-        VV currentValue;
-
-        public MappedMapIterator(MapIterator<K, V> source,
-                BiMapper<? super K, ? super V, ? extends VV> mapper) {
-            this.source = Objects.requireNonNull(source);
-            this.mapper = Objects.requireNonNull(mapper);
-        }
-
-        @Override
-        public boolean hasNext() {
-            return source.hasNext();
-        }
-
-        @Override
-        public Mapping<K, VV> next() {
-            currentKey = source.nextKey();
-            currentValue = mapper.map((K) currentKey, source.curValue());
-            return new Mapping.MappingValue<>((K) currentKey, currentValue);
-        }
-
-        @Override
-        public K nextKey() {
-            currentKey = source.nextKey();
-            currentValue = mapper.map((K) currentKey, source.curValue());
-            return (K) currentKey;
-        }
-
-        @Override
-        public VV nextValue() {
-            currentKey = source.nextKey();
-            currentValue = mapper.map((K) currentKey, source.curValue());
-            return currentValue;
-        }
-
-        @Override
-        public K curKey() {
-            if (NO_CURRENT == currentKey) {
-                throw new NoSuchElementException("No Current Element");
-            }
-
-            return (K) currentKey;
-        }
-
-        @Override
-        public VV curValue() {
-            if (NO_CURRENT == currentKey) {
-                throw new NoSuchElementException("No Current Element");
-            }
-
-            return currentValue;
-        }
-    }
-}
--- a/src/share/classes/java/util/streams/ops/BiTeeOp.java	Thu Oct 18 13:02:45 2012 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,124 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package java.util.streams.ops;
-
-import java.util.Iterator;
-import java.util.MapIterator;
-import java.util.Mapping;
-import java.util.Objects;
-import java.util.functions.BiBlock;
-import java.util.streams.Sink;
-import java.util.streams.Stream;
-import java.util.streams.StreamShape;
-
-/**
- * Passes elements to provided block as encountered and passes objects
- * downstream.
- *
- * @param <K> Type of element keys.
- * @param <V> Type of element values.
- */
-public class BiTeeOp<K, V> implements IntermediateOp<Mapping<K,V>, Mapping<K,V>> {
-
-    /**
-     * Tee block for this operation.
-     */
-    public final BiBlock<? super K, ? super V> tee;
-
-    public BiTeeOp(BiBlock<? super K, ? super V> tee) {
-        this.tee = Objects.requireNonNull(tee);
-    }
-
-    @Override
-    public MapIterator<K, V> wrapIterator(final Iterator<Mapping<K, V>> source) {
-        return iterator(MapIterator.IteratorAdapter.adapt(source), tee);
-    }
-
-    @Override
-    public Sink<Mapping<K, V>, K, V> wrapSink(Sink sink) {
-        return new Sink.ChainedMap<K,V>(sink) {
-            @Override
-            public void accept(K k, V v) {
-                tee.apply(k,v);
-                downstream.accept(k, v);
-            }
-        };
-    }
-
-    public static <K, V> MapIterator<K, V> iterator(final MapIterator<K, V> source,
-                                                    final BiBlock<? super K, ? super V> tee) {
-        Objects.requireNonNull(source);
-        Objects.requireNonNull(tee);
-        return new MapIterator<K, V>() {
-            @Override
-            public boolean hasNext() {
-                return source.hasNext();
-            }
-
-            @Override
-            public Mapping<K, V> next() {
-                Mapping<K, V> current = source.next();
-                tee.apply(current.getKey(), current.getValue());
-                return current;
-            }
-
-            @Override
-            public K nextKey() {
-                K k = source.nextKey();
-                V v = source.curValue();
-                tee.apply(k, v);
-                return k;
-            }
-
-            @Override
-            public V nextValue() {
-                K k = source.nextKey();
-                V v = source.curValue();
-                tee.apply(k, v);
-                return v;
-            }
-
-            @Override
-            public K curKey() {
-                return source.curKey();
-            }
-
-            @Override
-            public V curValue() {
-                return source.curValue();
-            }
-        };
-    }
-
-    @Override
-    public StreamShape inputShape() {
-        return StreamShape.KEY_VALUE;
-    }
-
-    @Override
-    public StreamShape outputShape() {
-        return StreamShape.KEY_VALUE;
-    }
-}
--- a/src/share/classes/java/util/streams/ops/ConcatOp.java	Thu Oct 18 13:02:45 2012 -0700
+++ b/src/share/classes/java/util/streams/ops/ConcatOp.java	Thu Oct 18 18:19:53 2012 -0400
@@ -24,7 +24,9 @@
  */
 package java.util.streams.ops;
 
-import java.util.*;
+import java.util.Iterator;
+import java.util.Iterators;
+import java.util.Objects;
 import java.util.streams.*;
 
 public abstract class ConcatOp<T> implements StatefulOp<T, T> {
@@ -44,7 +46,7 @@
     public abstract Iterator<T> wrapIterator(Iterator<T> source);
 
     @Override
-    public abstract Sink<T, ?, ?> wrapSink(Sink sink);
+    public abstract Sink<T> wrapSink(Sink sink);
 
     @Override
     public StreamShape inputShape() {
@@ -87,7 +89,7 @@
             }
 
             @Override
-            public Sink<T, ?, ?> wrapSink(Sink sink) {
+            public Sink<T> wrapSink(Sink sink) {
                 Objects.requireNonNull(sink);
 
                 return new Sink.ChainedValue<T>(sink) {
@@ -139,47 +141,4 @@
         };
     }
 
-    public static <K, V> ConcatOp<Mapping<K, V>> makeMap(final MapStream<K, V> stream) {
-        return new ConcatOp<Mapping<K, V>>(StreamShape.KEY_VALUE) {
-
-            @Override
-            public Iterator<Mapping<K, V>> wrapIterator(Iterator<Mapping<K, V>> source) {
-                Objects.requireNonNull(source);
-
-                return MapIterator.IteratorAdapter.adapt(Iterators.concat(source, stream.iterator()));
-            }
-
-            @Override
-            public Sink<Mapping<K, V>, ?, ?> wrapSink(Sink sink) {
-                Objects.requireNonNull(sink);
-
-                return new Sink.ChainedMap<K, V>(sink) {
-                    @Override
-                    public void accept(K k, V v) {
-                        downstream.accept(k, v);
-                    }
-
-                    @Override
-                    public void end() {
-                        // Pull from the concatenating stream to ensure sequential access
-                        // Note that stream.forEach(downstream) will not, in the parallel case,
-                        // guarantee an order, and stream.sequential().forEach(downstream) will
-                        // result in buffering of the stream contents
-                        MapIterator<K, V> i = stream.iterator();
-                        while (i.hasNext()) {
-                            downstream.accept(i.nextKey(), i.curValue());
-                        }
-                        downstream.end();
-                    }
-                };
-            }
-
-            @Override
-            protected Node<Mapping<K, V>> computeParallelFromConcatenatingStream() {
-                // @@@ Not currently possible to create TreeUtils.Node from a MapStream source
-                throw new UnsupportedOperationException();
-            }
-        };
-    }
-
 }
--- a/src/share/classes/java/util/streams/ops/CumulateOp.java	Thu Oct 18 13:02:45 2012 -0700
+++ b/src/share/classes/java/util/streams/ops/CumulateOp.java	Thu Oct 18 18:19:53 2012 -0400
@@ -26,7 +26,6 @@
 
 import java.util.Iterator;
 import java.util.Objects;
-import java.util.streams.Spliterator;
 import java.util.concurrent.RecursiveTask;
 import java.util.functions.BinaryOperator;
 import java.util.streams.*;
--- a/src/share/classes/java/util/streams/ops/EvaluableOp.java	Thu Oct 18 13:02:45 2012 -0700
+++ b/src/share/classes/java/util/streams/ops/EvaluableOp.java	Thu Oct 18 18:19:53 2012 -0400
@@ -28,7 +28,6 @@
 import java.util.logging.Logger;
 import java.util.streams.ParallelPipelineHelper;
 import java.util.streams.PipelineHelper;
-import java.util.streams.StreamAccessor;
 
 /**
  * An Op whose results can be evaluated directly
--- a/src/share/classes/java/util/streams/ops/FilterOp.java	Thu Oct 18 13:02:45 2012 -0700
+++ b/src/share/classes/java/util/streams/ops/FilterOp.java	Thu Oct 18 18:19:53 2012 -0400
@@ -54,7 +54,7 @@
     }
 
     @Override
-    public Sink<T, ?, ?> wrapSink(final Sink sink) {
+    public Sink<T> wrapSink(final Sink sink) {
         Objects.requireNonNull(sink);
         return new Sink.ChainedValue<T>(sink) {
             @Override
--- a/src/share/classes/java/util/streams/ops/FindAnyOp.java	Thu Oct 18 13:02:45 2012 -0700
+++ b/src/share/classes/java/util/streams/ops/FindAnyOp.java	Thu Oct 18 18:19:53 2012 -0400
@@ -27,7 +27,6 @@
 import java.util.Iterator;
 import java.util.Optional;
 import java.util.streams.PipelineHelper;
-import java.util.streams.StreamAccessor;
 
 /**
  * FindAnyOp
--- a/src/share/classes/java/util/streams/ops/FindFirstOp.java	Thu Oct 18 13:02:45 2012 -0700
+++ b/src/share/classes/java/util/streams/ops/FindFirstOp.java	Thu Oct 18 18:19:53 2012 -0400
@@ -27,7 +27,6 @@
 import java.util.Iterator;
 import java.util.Optional;
 import java.util.streams.PipelineHelper;
-import java.util.streams.StreamAccessor;
 
 /**
  * FindFirstOp
--- a/src/share/classes/java/util/streams/ops/FlatMapOp.java	Thu Oct 18 13:02:45 2012 -0700
+++ b/src/share/classes/java/util/streams/ops/FlatMapOp.java	Thu Oct 18 18:19:53 2012 -0400
@@ -28,7 +28,8 @@
 import java.util.NoSuchElementException;
 import java.util.Objects;
 import java.util.functions.FlatMapper;
-import java.util.streams.*;
+import java.util.streams.Sink;
+import java.util.streams.StreamOpFlags;
 
 /**
  * FlatMapOp
@@ -55,7 +56,7 @@
     }
 
     @Override
-    public Sink<T,?,?> wrapSink(final Sink sink) {
+    public Sink<T> wrapSink(final Sink sink) {
         Objects.requireNonNull(sink);
         return new Sink.ChainedValue<T>(sink) {
             public void accept(T t) {
--- a/src/share/classes/java/util/streams/ops/FoldOp.java	Thu Oct 18 13:02:45 2012 -0700
+++ b/src/share/classes/java/util/streams/ops/FoldOp.java	Thu Oct 18 18:19:53 2012 -0400
@@ -28,7 +28,10 @@
 import java.util.functions.BinaryOperator;
 import java.util.functions.Combiner;
 import java.util.functions.Factory;
-import java.util.streams.*;
+import java.util.streams.ParallelPipelineHelper;
+import java.util.streams.PipelineHelper;
+import java.util.streams.Spliterator;
+import java.util.streams.TerminalSink;
 
 /**
  * FoldOp
--- a/src/share/classes/java/util/streams/ops/ForEachOp.java	Thu Oct 18 13:02:45 2012 -0700
+++ b/src/share/classes/java/util/streams/ops/ForEachOp.java	Thu Oct 18 18:19:53 2012 -0400
@@ -24,9 +24,7 @@
  */
 package java.util.streams.ops;
 
-import java.util.Mapping;
 import java.util.Objects;
-import java.util.functions.BiBlock;
 import java.util.functions.Block;
 import java.util.logging.Logger;
 import java.util.streams.*;
@@ -61,27 +59,6 @@
         }, StreamShape.VALUE);
     }
 
-    public static<K, V> ForEachOp<Mapping<K,V>> make(final BiBlock<? super K, ? super V> block) {
-        Objects.requireNonNull(block);
-        return new ForEachOp<>(new TerminalSink<Mapping<K,V>, Void>() {
-            @Override
-            public void accept(Object k, Object v) {
-                block.apply((K) k, (V) v);
-            }
-
-            @Override
-            public void accept(Mapping<K, V> mapping) {
-                LOGGER.warning("ForEachOp.accept(Mapping) called.");
-                block.apply(mapping.getKey(), mapping.getValue());
-            }
-
-            @Override
-            public Void getAndClearState() {
-                return null;
-            }
-        }, StreamShape.KEY_VALUE);
-    }
-
     @Override
     public StreamShape inputShape() {
         return shape;
@@ -99,14 +76,14 @@
 
     // @@@ Extending AbstractTask here is probably inefficient, since we don't really need to keep track of the structure of the computation tree
     private static class ForEachTask<S, T> extends AbstractTask<S, T, Void, ForEachTask<S, T>> {
-        private final Sink<S, ?, ?> sink;
+        private final Sink<S> sink;
 
-        private ForEachTask(ParallelPipelineHelper<S, T> helper, Sink<S, ?, ?> sink) {
+        private ForEachTask(ParallelPipelineHelper<S, T> helper, Sink<S> sink) {
             super(helper);
             this.sink = sink;
         }
 
-        private ForEachTask(ForEachTask<S, T> parent, Spliterator<S> spliterator, Sink<S, ?, ?> sink) {
+        private ForEachTask(ForEachTask<S, T> parent, Spliterator<S> spliterator, Sink<S> sink) {
             super(parent, spliterator);
             this.sink = sink;
         }
--- a/src/share/classes/java/util/streams/ops/GroupByOp.java	Thu Oct 18 13:02:45 2012 -0700
+++ b/src/share/classes/java/util/streams/ops/GroupByOp.java	Thu Oct 18 18:19:53 2012 -0400
@@ -98,11 +98,11 @@
         final ConcurrentHashMap<K, NodeBuilder<T>> map = new ConcurrentHashMap<>();
 
         // Cache the sink chain, so it can be reused by all F/J leaf tasks
-        Sink<S, ?, ?> sinkChain = helper.wrapSink(new Sink.OfValue<T>() {
+        Sink<S> sinkChain = helper.wrapSink(new Sink.OfValue<T>() {
             @Override
             public void accept(T t) {
                 K key = Objects.requireNonNull(mapper.map(t), String.format("The element %s cannot be mapped to a null key", t));
-                NodeBuilder<T> sb = map.computeIfAbsent(key, (k) -> Nodes.makeBuilder());
+                final NodeBuilder<T> sb = map.computeIfAbsent(key, (k) -> Nodes.makeBuilder());
                 synchronized (sb) {
                     sb.accept(t);
                 }
@@ -119,9 +119,9 @@
     // @@@ This is a lot of boiler plate for "spliterator.into(sinkChain)"
     //     consider abstracting to a static method on AbstractTask that takes a Block<Void>
     private static class GroupByTask<S, T> extends AbstractTask<S, T, Void, GroupByTask<S, T>> {
-        private final Sink<S, ?, ?> sinkChain;
+        private final Sink<S> sinkChain;
 
-        private GroupByTask(ParallelPipelineHelper<S, T> helper, Sink<S, ?, ?> sinkChain) {
+        private GroupByTask(ParallelPipelineHelper<S, T> helper, Sink<S> sinkChain) {
             super(helper);
             this.sinkChain = sinkChain;
         }
--- a/src/share/classes/java/util/streams/ops/IntermediateOp.java	Thu Oct 18 13:02:45 2012 -0700
+++ b/src/share/classes/java/util/streams/ops/IntermediateOp.java	Thu Oct 18 18:19:53 2012 -0400
@@ -74,7 +74,7 @@
      * @return a sink which will accept elements and perform the operation upon
      *         each element.
      */
-    Sink<E_IN, ?, ?> wrapSink(Sink sink);
+    Sink<E_IN> wrapSink(Sink sink);
 
     StreamShape inputShape() default { return StreamShape.VALUE; }
 
--- a/src/share/classes/java/util/streams/ops/LimitOp.java	Thu Oct 18 13:02:45 2012 -0700
+++ b/src/share/classes/java/util/streams/ops/LimitOp.java	Thu Oct 18 18:19:53 2012 -0400
@@ -28,7 +28,9 @@
 import java.util.Iterator;
 import java.util.NoSuchElementException;
 import java.util.Objects;
-import java.util.streams.*;
+import java.util.streams.ParallelPipelineHelper;
+import java.util.streams.Sink;
+import java.util.streams.StreamOpFlags;
 
 
 public class LimitOp<T> implements StatefulOp<T, T> {
@@ -48,7 +50,7 @@
     }
 
     @Override
-    public Sink<T, ?, ?> wrapSink(Sink sink) {
+    public Sink<T> wrapSink(Sink sink) {
         // @@@ Cannot short circuit the sink
         // @@@ This smells somewhat
         throw new UnsupportedOperationException();
@@ -75,7 +77,7 @@
     }
 
     public static <T> Iterator<T> iterator(Iterator<T> source, int limit) {
-        return (limit > 0 )
+        return (limit > 0)
                 ? new LimitingIterator<>(source, limit)
                 : Collections.emptyIterator();
     }
--- a/src/share/classes/java/util/streams/ops/MapExtractKeysOp.java	Thu Oct 18 13:02:45 2012 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package java.util.streams.ops;
-
-import java.util.Iterator;
-import java.util.MapIterator;
-import java.util.Mapping;
-import java.util.Objects;
-import java.util.streams.Sink;
-import java.util.streams.Stream;
-import java.util.streams.StreamShape;
-
-/**
- * MapExtractKeysOp
- *
- * @author Brian Goetz
- */
-public class MapExtractKeysOp<K, V> implements IntermediateOp<Mapping<K, V>, K> {
-
-    @Override
-    public StreamShape inputShape() {
-        return StreamShape.KEY_VALUE;
-    }
-
-    @Override
-    public Iterator<K> wrapIterator(final Iterator<Mapping<K, V>> source) {
-        Objects.requireNonNull(source);
-        final MapIterator<K,V> mi = MapIterator.IteratorAdapter.adapt(source);
-        return new Iterator<K>() {
-            @Override
-            public boolean hasNext() {
-                return mi.hasNext();
-            }
-
-            @Override
-            public K next() {
-                return mi.nextKey();
-            }
-        };
-    }
-
-    @Override
-    public Sink<Mapping<K, V>, K, V> wrapSink(final Sink sink) {
-        return new Sink.ChainedMap<K, V>(sink) {
-            @Override
-            public void accept(K k, V v) {
-                downstream.accept(k);
-            }
-        };
-    }
-}
--- a/src/share/classes/java/util/streams/ops/MapExtractValuesOp.java	Thu Oct 18 13:02:45 2012 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package java.util.streams.ops;
-
-import java.util.Iterator;
-import java.util.MapIterator;
-import java.util.Mapping;
-import java.util.Objects;
-import java.util.streams.Sink;
-import java.util.streams.StreamOpFlags;
-import java.util.streams.StreamShape;
-
-/**
- * MapExtractValuesOp
- *
- * @author Brian Goetz
- */
-public class MapExtractValuesOp<K, V> implements IntermediateOp<Mapping<K, V>, V> {
-
-    @Override
-    public int getOpFlags() {
-        return StreamOpFlags.NOT_SORTED | StreamOpFlags.NOT_DISTINCT;
-    }
-
-    @Override
-    public StreamShape inputShape() {
-        return StreamShape.KEY_VALUE;
-    }
-
-    @Override
-    public Iterator<V> wrapIterator(final Iterator<Mapping<K, V>> source) {
-        Objects.requireNonNull(source);
-        final MapIterator<K,V> mi = MapIterator.IteratorAdapter.adapt(source);
-        return new Iterator<V>() {
-            @Override
-            public boolean hasNext() {
-                return mi.hasNext();
-            }
-
-            @Override
-            public V next() {
-                return mi.nextValue();
-            }
-        };
-    }
-
-    @Override
-    public Sink<Mapping<K, V>, K, V> wrapSink(final Sink sink) {
-        return new Sink.ChainedMap<K, V>(sink) {
-            @Override
-            public void accept(K k, V v) {
-                downstream.accept(v);
-            }
-        };
-    }
-}
--- a/src/share/classes/java/util/streams/ops/MapFilterKeysOp.java	Thu Oct 18 13:02:45 2012 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package java.util.streams.ops;
-
-import java.util.Iterator;
-import java.util.MapIterator;
-import java.util.Mapping;
-import java.util.Objects;
-import java.util.functions.Predicate;
-import java.util.streams.Sink;
-import java.util.streams.StreamOpFlags;
-import java.util.streams.StreamShape;
-
-/**
- * MapFilterKeysOp
- *
- * @author Brian Goetz
- */
-public class MapFilterKeysOp<K, V> implements IntermediateOp<Mapping<K, V>, Mapping<K, V>> {
-    private final Predicate<? super K> predicate;
-
-    public MapFilterKeysOp(Predicate<? super K> predicate) {
-        this.predicate = Objects.requireNonNull(predicate);
-    }
-
-    @Override
-    public int getOpFlags() {
-        return StreamOpFlags.NOT_SIZED;
-    }
-
-    @Override
-    public StreamShape inputShape() {
-        return StreamShape.KEY_VALUE;
-    }
-
-    @Override
-    public StreamShape outputShape() {
-        return StreamShape.KEY_VALUE;
-    }
-
-    @Override
-    public MapIterator<K,V> wrapIterator(final Iterator<Mapping<K, V>> source) {
-        return new KeyFilteredMapIterator<>(MapIterator.IteratorAdapter.adapt(source), predicate);
-    }
-
-    @Override
-    public Sink<Mapping<K, V>, K, V> wrapSink(final Sink sink) {
-        return new Sink.ChainedMap<K, V>(sink) {
-            @Override
-            public void accept(K k, V v) {
-                if (predicate.test(k)) {
-                    downstream.accept(k, v);
-                }
-            }
-        };
-    }
-
-    public static <K, V> MapIterator<K, V> iterator(MapIterator<K, V> source, Predicate<? super K> predicate) {
-        return new KeyFilteredMapIterator<>(source, predicate);
-    }
-
-    private static class KeyFilteredMapIterator<K, V> extends MapIterator.FilteredMapIterator<K, V> {
-
-        private final Predicate<? super K> predicate;
-
-        public KeyFilteredMapIterator(MapIterator<K, V> source,
-                Predicate<? super K> predicate) {
-            super(source);
-            this.predicate = Objects.requireNonNull(predicate);
-        }
-
-        @Override
-        public boolean hasNext() {
-            while ((NO_CURRENT == nextKey) && source.hasNext()) {
-                nextKey = source.nextKey();
-                nextValue = source.curValue();
-                if(!predicate.test((K)nextKey)) {
-                    nextKey = nextValue = NO_CURRENT;
-                }
-            }
-
-            return NO_CURRENT != nextKey;
-        }
-    }
-}
--- a/src/share/classes/java/util/streams/ops/MapFilterValuesOp.java	Thu Oct 18 13:02:45 2012 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package java.util.streams.ops;
-
-import java.util.Iterator;
-import java.util.MapIterator;
-import java.util.Mapping;
-import java.util.Objects;
-import java.util.functions.Predicate;
-import java.util.streams.Sink;
-import java.util.streams.StreamOpFlags;
-import java.util.streams.StreamShape;
-
-/**
- * !?! mduigou I don't like the Map*Op naming for MapStream ops.
- *
- * @author Brian Goetz
- */
-public class MapFilterValuesOp<K, V> implements IntermediateOp<Mapping<K,V>, Mapping<K,V>> {
-    private final Predicate<? super V> predicate;
-
-    public MapFilterValuesOp(Predicate<? super V> predicate) {
-        this.predicate = Objects.requireNonNull(predicate);
-    }
-
-    @Override
-    public int getOpFlags() {
-        return StreamOpFlags.NOT_SIZED;
-    }
-
-    @Override
-    public StreamShape inputShape() {
-        return StreamShape.KEY_VALUE;
-    }
-
-    @Override
-    public StreamShape outputShape() {
-        return StreamShape.KEY_VALUE;
-    }
-
-    @Override
-    public MapIterator<K,V> wrapIterator(final Iterator<Mapping<K, V>> source) {
-        return new ValueFilteredMapIterator<>(MapIterator.IteratorAdapter.adapt(source), predicate);
-    }
-
-    @Override
-    public Sink<Mapping<K, V>, K, V> wrapSink(Sink sink) {
-        return new Sink.ChainedMap<K, V>(sink) {
-            @Override
-            public void accept(K k, V v) {
-                if (predicate.test(v)) {
-                    downstream.accept(k, v);
-                }
-            }
-        };
-    }
-
-    public static <K, V> MapIterator<K, V> iterator(MapIterator<K, V> source, Predicate<? super V> predicate) {
-        return new ValueFilteredMapIterator<>(source, predicate);
-    }
-
-        private static class ValueFilteredMapIterator<K, V> extends MapIterator.FilteredMapIterator<K, V> {
-
-        private final Predicate<? super V> predicate;
-
-        public ValueFilteredMapIterator(MapIterator<K, V> source,
-                Predicate<? super V> predicate) {
-            super(source);
-            this.predicate = Objects.requireNonNull(predicate);
-        }
-
-        @Override
-        public boolean hasNext() {
-            while ((NO_CURRENT == nextKey) && source.hasNext()) {
-                nextKey = source.nextKey();
-                nextValue = source.curValue();
-                if(!predicate.test((V)nextValue)) {
-                    nextKey = nextValue = NO_CURRENT;
-                }
-            }
-
-            return NO_CURRENT != nextKey;
-        }
-    }
-}
--- a/src/share/classes/java/util/streams/ops/MapLimitOp.java	Thu Oct 18 13:02:45 2012 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,147 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package java.util.streams.ops;
-
-import java.util.*;
-import java.util.streams.*;
-
-public class MapLimitOp<K, V> implements StatefulOp<Mapping<K, V>, Mapping<K, V>> {
-
-    private final int limit;
-
-    public MapLimitOp(int limit) {
-        if (limit < 0)
-            throw new IllegalArgumentException("Limit must be non-negative: " + limit);
-
-        this.limit = limit;
-    }
-
-    @Override
-    public int getOpFlags() {
-        return StreamOpFlags.NOT_SIZED | StreamOpFlags.NOT_INFINITELY_SIZED | StreamOpFlags.IS_SHORT_CIRCUIT;
-    }
-
-    @Override
-    public Sink<Mapping<K, V>, K, V> wrapSink(Sink sink) {
-        // @@@ Cannot short circuit the sink
-        // @@@ This smells somewhat
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public MapIterator<K, V> wrapIterator(final Iterator<Mapping<K, V>> source) {
-        return iterator(MapIterator.IteratorAdapter.adapt(source), limit);
-    }
-
-    @Override
-    public <S> Node<Mapping<K, V>> evaluateParallel(ParallelPipelineHelper<S, Mapping<K, V>> helper) {
-        // Dumb serial implementation defering to iterator
-        final MapIterator<K, V> i = (MapIterator<K,V>) helper.iterator();
-
-        // @@@ if limit is small enough can use fixed size builder
-        final NodeBuilder<Mapping<K, V>> nb = Nodes.makeBuilder();
-        nb.begin(limit);
-        while (i.hasNext())
-            nb.accept(i.nextKey(), i.curValue());
-        nb.end();
-
-        return nb;
-    }
-
-    public static <K, V> MapIterator<K, V> iterator(final MapIterator<K, V> source,
-                                                    final int limit) {
-        return new LimitingMapIterator<>(source, limit);
-    }
-
-    private static class LimitingMapIterator<K, V> implements MapIterator<K, V> {
-        private final MapIterator<K, V> source;
-
-        private int limit;
-
-        public LimitingMapIterator(MapIterator<K, V> source, int limit) {
-            Objects.requireNonNull(source);
-            if (limit < 0)
-                throw new IllegalArgumentException("Limit must be non-negative: " + limit);
-
-            this.source = source;
-            this.limit = limit;
-        }
-
-        @Override
-        public boolean hasNext() {
-            if (limit > 0)
-                return source.hasNext();
-
-            return false;
-        }
-
-        @Override
-        public Mapping<K, V> next() {
-            if (!hasNext())
-                throw new NoSuchElementException("No Current Element");
-
-            limit--;
-            return source.next();
-        }
-
-        @Override
-        public K nextKey() {
-            if (!hasNext())
-                throw new NoSuchElementException("No Current Element");
-
-            limit--;
-            return source.nextKey();
-        }
-
-        @Override
-        public V nextValue() {
-            if (!hasNext())
-                throw new NoSuchElementException("No Current Element");
-
-            limit--;
-            return source.nextValue();
-        }
-
-        @Override
-        public K curKey() {
-            return source.curKey();
-        }
-
-        @Override
-        public V curValue() {
-            return source.curValue();
-        }
-    }
-
-    @Override
-    public StreamShape inputShape() {
-        return StreamShape.KEY_VALUE;
-    }
-
-    @Override
-    public StreamShape outputShape() {
-        return StreamShape.KEY_VALUE;
-    }
-}
--- a/src/share/classes/java/util/streams/ops/MapMapValuesOp.java	Thu Oct 18 13:02:45 2012 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,136 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package java.util.streams.ops;
-
-import java.util.Iterator;
-import java.util.MapIterator;
-import java.util.Mapping;
-import java.util.NoSuchElementException;
-import java.util.Objects;
-import java.util.functions.Mapper;
-import java.util.streams.Sink;
-import java.util.streams.Stream;
-import java.util.streams.StreamShape;
-
-/**
- * !?! mduigou I don't like the Map*Op naming for MapStream ops.
- *
- * @param <K> Type of element keys.
- * @param <V> Type of input element values.
- * @param <U> Type of output element values.
- *
- * @author Brian Goetz
- */
-public class MapMapValuesOp<K, V, U> implements IntermediateOp<Mapping<K,V>, Mapping<K,U>> {
-    private final Mapper<? super V, ? extends U> mapper;
-
-    public MapMapValuesOp(Mapper<? super V, ? extends U> mapper) {
-        this.mapper = Objects.requireNonNull(mapper);
-    }
-
-    @Override
-    public StreamShape inputShape() {
-        return StreamShape.KEY_VALUE;
-    }
-
-    @Override
-    public StreamShape outputShape() {
-        return StreamShape.KEY_VALUE;
-    }
-
-    @Override
-    public MapIterator<K,U> wrapIterator(final Iterator<Mapping<K, V>> source) {
-        return new MappedMapIterator<>(MapIterator.IteratorAdapter.adapt(source), mapper);
-    }
-
-    @Override
-    public Sink<Mapping<K, V>, K, V> wrapSink(Sink sink) {
-        return new Sink.ChainedMap<K,V>(sink) {
-            @Override
-            public void accept(K k, V v) {
-                downstream.accept(k, mapper.map(v));
-            }
-        };
-    }
-
-    private static class MappedMapIterator<K, V, VV> implements MapIterator<K, VV> {
-
-        private static final Object NO_CURRENT = new Object();
-        private final MapIterator<K, V> source;
-        private final Mapper<? super V, ? extends VV> mapper;
-        Object currentKey = NO_CURRENT;
-        VV currentValue;
-
-        public MappedMapIterator(MapIterator<K, V> source,
-                Mapper<? super V, ? extends VV> mapper) {
-            this.source = Objects.requireNonNull(source);
-            this.mapper = Objects.requireNonNull(mapper);
-        }
-
-        @Override
-        public boolean hasNext() {
-            return source.hasNext();
-        }
-
-        @Override
-        public Mapping<K, VV> next() {
-            currentKey = source.nextKey();
-            currentValue = mapper.map(source.curValue());
-            return new Mapping.MappingValue<>((K) currentKey, currentValue);
-        }
-
-        @Override
-        public K nextKey() {
-            currentKey = source.nextKey();
-            currentValue = mapper.map(source.curValue());
-            return (K) currentKey;
-        }
-
-        @Override
-        public VV nextValue() {
-            currentKey = source.nextKey();
-            currentValue = mapper.map(source.curValue());
-            return currentValue;
-        }
-
-        @Override
-        public K curKey() {
-            if (NO_CURRENT == currentKey) {
-                throw new NoSuchElementException("No Current Element");
-            }
-
-            return (K) currentKey;
-        }
-
-        @Override
-        public VV curValue() {
-            if (NO_CURRENT == currentKey) {
-                throw new NoSuchElementException("No Current Element");
-            }
-
-            return currentValue;
-        }
-    }
-}
--- a/src/share/classes/java/util/streams/ops/MapOp.java	Thu Oct 18 13:02:45 2012 -0700
+++ b/src/share/classes/java/util/streams/ops/MapOp.java	Thu Oct 18 18:19:53 2012 -0400
@@ -53,7 +53,7 @@
     }
 
     @Override
-    public Sink<T, ?, ?> wrapSink(Sink sink) {
+    public Sink<T> wrapSink(Sink sink) {
         return new Sink.ChainedValue<T>(sink) {
             @Override
             public void accept(T t) {
--- a/src/share/classes/java/util/streams/ops/MapSkipOp.java	Thu Oct 18 13:02:45 2012 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,98 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package java.util.streams.ops;
-
-import java.util.Iterator;
-import java.util.MapIterator;
-import java.util.Mapping;
-import java.util.Objects;
-import java.util.streams.Sink;
-import java.util.streams.StreamOpFlags;
-import java.util.streams.StreamShape;
-
-public class MapSkipOp<K, V> implements StatefulOp<Mapping<K, V>, Mapping<K, V>> {
-
-    private final int skip;
-
-    public MapSkipOp(int skip) {
-        if (skip < 0)
-            throw new IllegalArgumentException("Skip must be non-negative: " + skip);
-
-        this.skip = skip;
-    }
-
-    @Override
-    public int getOpFlags() {
-        return StreamOpFlags.NOT_SIZED;
-    }
-
-    @Override
-    public Sink<Mapping<K, V>, K, V> wrapSink(Sink sink) {
-        Objects.requireNonNull(sink);
-        return new Sink.ChainedMap<K, V>(sink) {
-            int n = skip;
-
-            @Override
-            public void accept(K k, V v) {
-                if (n == 0) {
-                    downstream.accept(k, v);
-                }
-                else {
-                    n--;
-                }
-            }
-        };
-    }
-
-    @Override
-    public MapIterator<K, V> wrapIterator(final Iterator<Mapping<K, V>> source) {
-        return iterator(MapIterator.IteratorAdapter.adapt(source), skip);
-    }
-
-    public static <K, V> MapIterator<K, V> iterator(final MapIterator<K, V> source,
-                                                    int skip) {
-        if (skip < 0)
-            throw new IllegalArgumentException("Skip must be non-negative: " + skip);
-
-        // @@@ Should this be performed by a wrapping iterator on first call to hasNext/next?
-        // Skip elements in the source
-        while (skip > 0 && source.hasNext()) {
-            source.next();
-            skip--;
-        }
-
-        return source;
-    }
-
-    @Override
-    public StreamShape inputShape() {
-        return StreamShape.KEY_VALUE;
-    }
-
-    @Override
-    public StreamShape outputShape() {
-        return StreamShape.KEY_VALUE;
-    }
-}
--- a/src/share/classes/java/util/streams/ops/MapSortedOp.java	Thu Oct 18 13:02:45 2012 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package java.util.streams.ops;
-
-import java.util.*;
-import java.util.streams.Sink;
-import java.util.streams.Stream;
-import java.util.streams.StreamShape;
-
-
-/**
- * An operation which sorts elements.
- *
- * @param <K> Type of keys to be sorted
- * @param <V> Values associated with keys to be sorted
- *
- */
-public class MapSortedOp<K extends Comparable<? super K>, V> extends SortedOp<Mapping<K, V>> {
-
-    /**
-     * Sort using natural order of {@literal <K>} which must be
-     * {@code Comparable}.
-     */
-    public MapSortedOp() {
-        // Will throw CCE when we try to sort if Mapping<K,V> is not Comparable
-        this(Comparators.<K,V>naturalOrderKeys());
-    }
-
-    /**
-     * Sort using the provided comparator.
-     *
-     * @param comparator The comparator to be used to evaluate ordering.
-     */
-    public MapSortedOp(Comparator<? super Mapping<K,V>> comparator) {
-        super(comparator);
-    }
-
-    @Override
-    public Sink<Mapping<K, V>, K, V> wrapSink(Sink sink) {
-        return new Sink.ChainedMapAdapter<K, V>(
-            (Sink.ChainedValue<Mapping<K, V>>) super.wrapSink(sink));
-    }
-
-    @Override
-    public MapIterator<K,V> wrapIterator(Iterator<Mapping<K, V>> iterator) {
-        return MapIterator.IteratorAdapter.adapt(super.wrapIterator(iterator));
-    }
-
-    @Override
-    public StreamShape inputShape() {
-        return StreamShape.KEY_VALUE;
-    }
-
-    @Override
-    public StreamShape outputShape() {
-        return StreamShape.KEY_VALUE;
-    }
-}
--- a/src/share/classes/java/util/streams/ops/MapSwapOp.java	Thu Oct 18 13:02:45 2012 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,112 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package java.util.streams.ops;
-
-import java.util.Iterator;
-import java.util.MapIterator;
-import java.util.Mapping;
-import java.util.streams.Sink;
-import java.util.streams.StreamOpFlags;
-import java.util.streams.StreamShape;
-
-/**
- * Operation that swaps keys and values of a mapping.
- *
- * !?! mduigou I don't like the Map*Op naming for MapStream ops.
- */
-public class MapSwapOp<K, V> implements IntermediateOp<Mapping<K, V>, Mapping<V, K>> {
-
-    private static MapSwapOp<?,?> INSTANCE = new MapSwapOp<>();
-
-    public MapSwapOp() {
-    }
-
-    public static <K,V> MapSwapOp<K,V> singleton() {
-        return (MapSwapOp<K,V>) INSTANCE;
-    }
-
-    @Override
-    public int getOpFlags() {
-        return StreamOpFlags.NOT_SORTED | StreamOpFlags.NOT_DISTINCT;
-    }
-
-    @Override
-    public MapIterator<V, K> wrapIterator(final Iterator<Mapping<K, V>> source) {
-        final MapIterator<K,V> asMI = MapIterator.IteratorAdapter.adapt(source);
-        return new MapIterator<V, K>() {
-            @Override
-            public boolean hasNext() {
-                return asMI.hasNext();
-            }
-
-            @Override
-            public V nextKey() {
-                return asMI.nextValue();
-            }
-
-            @Override
-            public K nextValue() {
-                return asMI.nextKey();
-            }
-
-            @Override
-            public V curKey() {
-                return asMI.curValue();
-            }
-
-            @Override
-            public K curValue() {
-                return asMI.curKey();
-            }
-
-            @Override
-            public Mapping<V, K> next() {
-                K k = asMI.nextKey();
-                V v = asMI.curValue();
-                return new Mapping.MappingValue<>(v, k);
-            }
-        };
-    }
-
-    @Override
-    public Sink<Mapping<K, V>, K, V> wrapSink(Sink sink) {
-        return new Sink.ChainedMap<K,V>(sink) {
-            @Override
-            public void accept(K k, V v) {
-                downstream.accept(v, k);
-            }
-        };
-    }
-
-    @Override
-    public StreamShape inputShape() {
-        return StreamShape.KEY_VALUE;
-    }
-
-    @Override
-    public StreamShape outputShape() {
-        return StreamShape.KEY_VALUE;
-    }
-}
--- a/src/share/classes/java/util/streams/ops/MappedOp.java	Thu Oct 18 13:02:45 2012 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,115 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package java.util.streams.ops;
-
-import java.util.*;
-import java.util.functions.Mapper;
-import java.util.streams.Sink;
-import java.util.streams.Stream;
-import java.util.streams.StreamShape;
-
-/**
- * MappedOp
- *
- * @author Brian Goetz
- */
-public class MappedOp<T, R> implements IntermediateOp<T, Mapping<T, R>> {
-    private final Mapper<? super T, ? extends R> mapper;
-
-    public MappedOp(Mapper<? super T, ? extends R> mapper) {
-        this.mapper = Objects.requireNonNull(mapper);
-    }
-
-    @Override
-    public MapIterator<T, R> wrapIterator(final Iterator<T> in) {
-        return new MapIterator<T, R>() {
-            boolean hasCurrent;
-            T currentKey;
-            R currentValue;
-
-            private void advance() {
-                if (!in.hasNext())
-                    throw new NoSuchElementException();
-                hasCurrent = true;
-                currentKey = in.next();
-                currentValue = mapper.map(currentKey);
-            }
-
-            @Override
-            public T nextKey() {
-                advance();
-                return currentKey;
-            }
-
-            @Override
-            public R nextValue() {
-                advance();
-                return currentValue;
-            }
-
-            @Override
-            public T curKey() {
-                if (hasCurrent)
-                    return currentKey;
-                else
-                    throw new NoSuchElementException();
-            }
-
-            @Override
-            public R curValue() {
-                if (hasCurrent)
-                    return currentValue;
-                else
-                    throw new NoSuchElementException();
-            }
-
-            @Override
-            public boolean hasNext() {
-                return in.hasNext();
-            }
-
-            @Override
-            public Mapping<T, R> next() {
-                advance();
-                return new Mapping.MappingValue<>(currentKey, currentValue);
-            }
-        };
-    }
-
-    @Override
-    public Sink<T,?,?> wrapSink(final Sink sink) {
-        return new Sink.ChainedValue<T>(sink) {
-            @Override
-            public void accept(T t) {
-                downstream.accept(t, mapper.map(t));
-            }
-        };
-    }
-
-    @Override
-    public StreamShape outputShape() {
-        return StreamShape.KEY_VALUE;
-    }
-}
--- a/src/share/classes/java/util/streams/ops/MatchOp.java	Thu Oct 18 13:02:45 2012 -0700
+++ b/src/share/classes/java/util/streams/ops/MatchOp.java	Thu Oct 18 18:19:53 2012 -0400
@@ -25,14 +25,14 @@
 package java.util.streams.ops;
 
 import java.util.Iterator;
-import java.util.MapIterator;
-import java.util.Mapping;
 import java.util.concurrent.CountedCompleter;
 import java.util.concurrent.atomic.AtomicReference;
-import java.util.functions.BiPredicate;
 import java.util.functions.Mapper;
 import java.util.functions.Predicate;
-import java.util.streams.*;
+import java.util.streams.ParallelPipelineHelper;
+import java.util.streams.PipelineHelper;
+import java.util.streams.Spliterator;
+import java.util.streams.StreamShape;
 
 /**
  * MatchOp
@@ -54,11 +54,6 @@
         return new MatchOp<T>(matchKind, it -> matchKind.match(it, predicate), StreamShape.VALUE);
     }
 
-    public static<K,V> MatchOp<Mapping<K,V>> make(BiPredicate<? super K, ? super V> predicate, MatchKind matchKind) {
-        return new MatchOp<Mapping<K,V>>(matchKind,
-                                         it -> matchKind.match(MapIterator.IteratorAdapter.adapt(it), predicate), StreamShape.KEY_VALUE);
-    }
-
     @Override
     public StreamShape inputShape() {
         return inputShape;
@@ -151,16 +146,5 @@
 
             return !shortCircuitResult;
         }
-
-        <K, V> boolean match(MapIterator<? extends K, ? extends V> iterator, BiPredicate<? super K, ? super V> predicate) {
-            while (iterator.hasNext()) {
-                if(predicate.test(iterator.nextKey(), iterator.curValue()) == stopOnPredicateMatches) {
-                    return shortCircuitResult;
-                }
-            }
-
-            return !shortCircuitResult;
-        }
     }
-
 }
--- a/src/share/classes/java/util/streams/ops/NodeBuilder.java	Thu Oct 18 13:02:45 2012 -0700
+++ b/src/share/classes/java/util/streams/ops/NodeBuilder.java	Thu Oct 18 18:19:53 2012 -0400
@@ -24,10 +24,9 @@
  */
 package java.util.streams.ops;
 
-import java.util.*;
+import java.util.Collection;
 import java.util.functions.Block;
 import java.util.streams.Sink;
-import java.util.streams.ops.Node;
 
 /**
  * NodeBuilder
--- a/src/share/classes/java/util/streams/ops/Nodes.java	Thu Oct 18 13:02:45 2012 -0700
+++ b/src/share/classes/java/util/streams/ops/Nodes.java	Thu Oct 18 18:19:53 2012 -0400
@@ -27,7 +27,9 @@
 import java.util.*;
 import java.util.functions.Block;
 import java.util.logging.Logger;
-import java.util.streams.*;
+import java.util.streams.Spliterator;
+import java.util.streams.Stream;
+import java.util.streams.Streams;
 
 public class Nodes {
 
--- a/src/share/classes/java/util/streams/ops/ReduceByOp.java	Thu Oct 18 13:02:45 2012 -0700
+++ b/src/share/classes/java/util/streams/ops/ReduceByOp.java	Thu Oct 18 18:19:53 2012 -0400
@@ -26,9 +26,10 @@
 
 import java.util.HashMap;
 import java.util.Map;
-import java.util.functions.*;
+import java.util.functions.Combiner;
+import java.util.functions.Factory;
+import java.util.functions.Mapper;
 import java.util.streams.PipelineHelper;
-import java.util.streams.StreamAccessor;
 import java.util.streams.TerminalSink;
 
 /**
--- a/src/share/classes/java/util/streams/ops/SeedlessFoldOp.java	Thu Oct 18 13:02:45 2012 -0700
+++ b/src/share/classes/java/util/streams/ops/SeedlessFoldOp.java	Thu Oct 18 18:19:53 2012 -0400
@@ -24,7 +24,6 @@
  */
 package java.util.streams.ops;
 
-import java.util.Iterator;
 import java.util.Objects;
 import java.util.Optional;
 import java.util.functions.BinaryOperator;
--- a/src/share/classes/java/util/streams/ops/SkipOp.java	Thu Oct 18 13:02:45 2012 -0700
+++ b/src/share/classes/java/util/streams/ops/SkipOp.java	Thu Oct 18 18:19:53 2012 -0400
@@ -46,7 +46,7 @@
     }
 
     @Override
-    public Sink<T, ?, ?> wrapSink(final Sink sink) {
+    public Sink<T> wrapSink(final Sink sink) {
         Objects.requireNonNull(sink);
         return new Sink.ChainedValue<T>(sink) {
             int n = skip;
--- a/src/share/classes/java/util/streams/ops/SortedOp.java	Thu Oct 18 13:02:45 2012 -0700
+++ b/src/share/classes/java/util/streams/ops/SortedOp.java	Thu Oct 18 18:19:53 2012 -0400
@@ -68,7 +68,7 @@
     }
 
     @Override
-    public Sink<T, ?, ?> wrapSink(Sink sink) {
+    public Sink<T> wrapSink(Sink sink) {
         return new Sink.ChainedValue<T>(sink) {
             PriorityQueue<T> pq;
             @Override
--- a/src/share/classes/java/util/streams/ops/StatefulOp.java	Thu Oct 18 13:02:45 2012 -0700
+++ b/src/share/classes/java/util/streams/ops/StatefulOp.java	Thu Oct 18 18:19:53 2012 -0400
@@ -1,6 +1,6 @@
 package java.util.streams.ops;
 
-import java.util.streams.*;
+import java.util.streams.PipelineHelper;
 
 /**
  * A stateful operation. State is accumulated as elements are processed.
--- a/src/share/classes/java/util/streams/ops/TeeOp.java	Thu Oct 18 13:02:45 2012 -0700
+++ b/src/share/classes/java/util/streams/ops/TeeOp.java	Thu Oct 18 18:19:53 2012 -0400
@@ -28,7 +28,6 @@
 import java.util.Objects;
 import java.util.functions.Block;
 import java.util.streams.Sink;
-import java.util.streams.Stream;
 
 /**
  * TeeOp
@@ -46,7 +45,7 @@
     }
 
     @Override
-    public Sink<T, ?, ?> wrapSink(Sink sink) {
+    public Sink<T> wrapSink(Sink sink) {
         return new Sink.ChainedValue<T>(sink) {
             @Override
             public void accept(T t) {
--- a/src/share/classes/java/util/streams/ops/TreeUtils.java	Thu Oct 18 13:02:45 2012 -0700
+++ b/src/share/classes/java/util/streams/ops/TreeUtils.java	Thu Oct 18 18:19:53 2012 -0400
@@ -24,9 +24,12 @@
  */
 package java.util.streams.ops;
 
-import java.util.*;
+import java.util.Arrays;
 import java.util.concurrent.CountedCompleter;
-import java.util.streams.*;
+import java.util.streams.ParallelPipelineHelper;
+import java.util.streams.PipelineHelper;
+import java.util.streams.Spliterator;
+import java.util.streams.StreamOpFlags;
 
 /**
  * Collector
--- a/src/share/classes/java/util/streams/ops/UniqOp.java	Thu Oct 18 13:02:45 2012 -0700
+++ b/src/share/classes/java/util/streams/ops/UniqOp.java	Thu Oct 18 18:19:53 2012 -0400
@@ -28,7 +28,10 @@
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.logging.Level;
 import java.util.logging.Logger;
-import java.util.streams.*;
+import java.util.streams.ParallelPipelineHelper;
+import java.util.streams.Sink;
+import java.util.streams.Spliterator;
+import java.util.streams.StreamOpFlags;
 
 /**
  * An stateful operation which eliminates duplicates from the stream.
@@ -55,7 +58,7 @@
     }
 
     @Override
-    public Sink<T, ?, ?> wrapSink(Sink sink) {
+    public Sink<T> wrapSink(Sink sink) {
         return new Sink.ChainedValue<T>(sink) {
             Set<T> seen;
 
@@ -125,18 +128,17 @@
             Logger.getLogger(getClass().getName()).log(Level.WARNING, "UniqOp.evaluateParallel does not preserve encounter order");
         }
 
-        final ConcurrentHashMap<T, Boolean> map = new ConcurrentHashMap();
+        final ConcurrentHashMap<T, Boolean> map = new ConcurrentHashMap<>();
 
         // Cache the sink chain, so it can be reused by all F/J leaf tasks
-        Sink<S, ?, ?> sinkChain = helper.wrapSink(new Sink.OfValue<T>() {
+        Sink<S> sinkChain = helper.wrapSink(new Sink.OfValue<T>() {
             @Override
             public void accept(T t) {
                 map.putIfAbsent(t, Boolean.TRUE);
             }
         });
 
-        UniqTask<S, T> task = new UniqTask<>(helper, sinkChain);
-        helper.invoke(task);
+        helper.invoke(new UniqTask<>(helper, sinkChain));
 
         // @@@ Not very efficient
         return Nodes.node((T[])map.keySet().toArray());
@@ -145,9 +147,9 @@
     // @@@ This is a lot of boiler plate for "spliterator.into(sinkChain)"
     //     consider abstracting to a static method on AbstractTask that takes a Block<Void>
     private static class UniqTask<S, T> extends AbstractTask<S, T, Void, UniqTask<S, T>> {
-        private final Sink<S, ?, ?> sinkChain;
+        private final Sink<S> sinkChain;
 
-        private UniqTask(ParallelPipelineHelper<S, T> helper, Sink<S, ?, ?> sinkChain) {
+        private UniqTask(ParallelPipelineHelper<S, T> helper, Sink<S> sinkChain) {
             super(helper);
             this.sinkChain = sinkChain;
         }
--- a/test-ng/tests/org/openjdk/tests/java/util/MapStreamTest.java	Thu Oct 18 13:02:45 2012 -0700
+++ b/test-ng/tests/org/openjdk/tests/java/util/MapStreamTest.java	Thu Oct 18 18:19:53 2012 -0400
@@ -25,10 +25,6 @@
 
 package org.openjdk.tests.java.util;
 
-import java.util.*;
-import java.util.streams.MapStream;
-import java.util.functions.Mapper;
-
 import org.testng.annotations.Test;
 
 import static org.testng.Assert.assertEquals;
--- a/test-ng/tests/org/openjdk/tests/java/util/streams/MapStreamTestDataProvider.java	Thu Oct 18 13:02:45 2012 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,147 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package org.openjdk.tests.java.util.streams;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Hashtable;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.TreeMap;
-import org.testng.annotations.DataProvider;
-
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentSkipListMap;
-import org.openjdk.tests.java.util.streams.ops.StreamOpTestCase;
-
-/**
- * MapStreamTestDataProvider
- */
-public class MapStreamTestDataProvider {
-
-    private static Map<Integer, Integer> makeIntegerIntegerMap(Class<? extends Map<Integer,Integer>> type, int size) {
-        try {
-            Map<Integer, Integer> map = type.newInstance();
-            for (int i = 1; i <= size; i++) {
-                map.put(i, i);
-            }
-            return map;
-        } catch (InstantiationException | IllegalAccessException badNews) {
-            throw new Error(badNews);
-        }
-    }
-
-    private static Map<Integer, String> makeIntegerStringMap(Class<? extends Map<Integer,String>> type, int size) {
-        try {
-            Map<Integer, String> map = type.newInstance();
-            for (int i = 1; i <= size; i++) {
-                map.put(i, Integer.toString(i));
-            }
-            return map;
-        } catch (InstantiationException | IllegalAccessException badNews) {
-            throw new Error(badNews);
-        }
-    }
-    private static final Class[] TYPES = {
-        HashMap.class,
-        Hashtable.class,
-        LinkedHashMap.class,
-        TreeMap.class,
-        ConcurrentHashMap.class,
-        ConcurrentSkipListMap.class
-    };
-    private static final int[] SIZES = {
-        0,
-        1,
-        10,
-        100,
-        1000
-    };
-    private static final Object[][] TEST_DATA_II;
-    private static final Object[][] TEST_DATA_IS;
-
-    static {
-        List<Object[]> list_ii = new ArrayList<>();
-        List<Object[]> list_is = new ArrayList<>();
-        for (Class<?> type : TYPES) {
-            @SuppressWarnings("unchecked")
-            String name = type.getName();
-            for (int size : SIZES) {
-                String range = 0 == size ? "[empty]" : String.format("[1..%d]", size);
-
-                @SuppressWarnings("unchecked")
-                Class<? extends Map<Integer,Integer>> mapTypeInteger = (Class<? extends Map<Integer,Integer>>) type;
-                list_ii.add(new Object[]{
-                            String.format("%s%s%s", name, "<Integer,Integer>", range),
-                            new StreamOpTestCase.MapTestData<>(makeIntegerIntegerMap(mapTypeInteger, size))
-                      });
-                @SuppressWarnings("unchecked")
-                Class<? extends Map<Integer,String>> mapTypeString = (Class<? extends Map<Integer,String>>) type;
-                list_is.add(new Object[]{
-                            String.format("%s%s%s", name, "<Integer,String>", range),
-                            new StreamOpTestCase.MapTestData<>(makeIntegerStringMap(mapTypeString, size))
-                      });
-            }
-        }
-
-        // Include sequential stream acccessors with unknown size
-        {
-            Class<?> type = HashMap.class;
-            String name = type.getName();
-            for (int size : SIZES) {
-                String range = 0 == size ? "[empty]" : String.format("[1..%d]", size);
-
-                @SuppressWarnings("unchecked")
-                Class<? extends Map<Integer,Integer>> mapTypeInteger = (Class<? extends Map<Integer,Integer>>) type;
-                list_ii.add(new Object[]{
-                        String.format("%s%s%s with sequential MapStreamAccessor of unknown size", name, "<Integer,Integer>", range),
-                        new StreamOpTestCase.MapTestDataOfUnknownSize<>(makeIntegerIntegerMap(mapTypeInteger, size))
-                });
-                @SuppressWarnings("unchecked")
-                Class<? extends Map<Integer,String>> mapTypeString = (Class<? extends Map<Integer,String>>) type;
-                list_is.add(new Object[]{
-                        String.format("%s%s%s with sequential MapStreamAccessor of unknown size", name, "<Integer,String>", range),
-                        new StreamOpTestCase.MapTestDataOfUnknownSize<>(makeIntegerStringMap(mapTypeString, size))
-                });
-            }
-        }
-
-        TEST_DATA_II = list_ii.toArray(new Object[0][]);
-        TEST_DATA_IS = list_is.toArray(new Object[0][]);
-    }
-
-    // Return an array of ( String name, TestData<Mapping<Integer, Integer>> )
-    @DataProvider(name = "opMapsII")
-    public static Object[][] makeMapTestDataII() {
-        return TEST_DATA_II;
-    }
-
-    // Return an array of ( String name, TestData<Mapping<Integer, String>> )
-    @DataProvider(name = "opMapsIS")
-    public static Object[][] makeMapTestDataIS() {
-        return TEST_DATA_IS;
-    }
-}
--- a/test-ng/tests/org/openjdk/tests/java/util/streams/ops/BiMatchOpTest.java	Thu Oct 18 13:02:45 2012 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,100 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package org.openjdk.tests.java.util.streams.ops;
-
-import org.openjdk.tests.java.util.streams.MapStreamTestDataProvider;
-import org.testng.annotations.Test;
-
-import java.util.functions.BiPredicate;
-import java.util.streams.MapStream;
-import java.util.streams.ops.MatchOp;
-
-import static java.util.streams.ops.MatchOp.MatchKind.*;
-import static org.openjdk.tests.java.util.LambdaTestHelpers.*;
-
-/**
- * MatchOpTest
- *
- * @author Brian Goetz
- */
-@Test
-public class BiMatchOpTest extends StreamOpTestCase {
-    @SuppressWarnings({ "unchecked", "raw" })
-    private static final BiPredicate<Integer, Integer>[] INTEGER_PREDICATES
-            = (BiPredicate<Integer, Integer>[]) new BiPredicate<?, ?>[] { bipTrue, bipFalse, bipBothEven, bipBothOdd };
-
-    private static final BiPredicate<?, ?>[] ANY_PREDICATES
-            = new BiPredicate<?, ?>[] { bipTrue, bipFalse, bipSameString };
-
-    private<K, V> void assertPredicates(MapStream<K, V> source, MatchOp.MatchKind matchKind, BiPredicate<K, V>[] predicates, boolean... answers) {
-        for (int i=0; i<predicates.length; i++) {
-            boolean match;
-            switch (matchKind) {
-                case ANY: match = source.anyMatch(predicates[i]); break;
-                case ALL: match = source.allMatch(predicates[i]); break;
-                case NONE: match = source.noneMatch(predicates[i]); break;
-                default: throw new IllegalStateException();
-            }
-            assertEquals(answers[i], match, matchKind.toString() + predicates[i].toString());
-        }
-    }
-
-    void testMatches() {
-        // We want to test Match ops here, not BiPredicates, which should have it's own test case.
-        // Empty stream, any should always be false, none and all are always true.
-        assertPredicates(countTo(0).stream().mapped(x -> x), ANY, INTEGER_PREDICATES, false, false, false, false);
-        assertPredicates(countTo(0).stream().mapped(x -> x), ALL, INTEGER_PREDICATES, true, true, true, true);
-        assertPredicates(countTo(0).stream().mapped(x -> x), NONE, INTEGER_PREDICATES, true, true, true, true);
-
-        // one element, any == all != none, 2 combinations
-        assertPredicates(countTo(1).stream().mapped(x -> x), ANY, INTEGER_PREDICATES, true, false, false, true);
-        assertPredicates(countTo(1).stream().mapped(x -> x), ALL, INTEGER_PREDICATES, true, false, false, true);
-        assertPredicates(countTo(1).stream().mapped(x -> x), NONE, INTEGER_PREDICATES, false, true, true, false);
-
-        // multiple elements, any != none, any false -> all false, 3 comninations
-        assertPredicates(countTo(5).stream().mapped(x -> x), NONE, INTEGER_PREDICATES, false, true, false, false);
-        assertPredicates(countTo(5).stream().mapped(x -> x), ANY, INTEGER_PREDICATES, true, false, true, true);
-        assertPredicates(countTo(5).stream().mapped(x -> x), ALL, INTEGER_PREDICATES, true, false, false, false);
-    }
-
-    @Test(dataProvider = "opMapsII", dataProviderClass = MapStreamTestDataProvider.class)
-    public void testOpsII(String name, MapTestData<Integer, Integer> data) {
-        for (BiPredicate<Integer, Integer> p : INTEGER_PREDICATES) {
-            for (MatchOp.MatchKind matchKind : MatchOp.MatchKind.values()) {
-                exerciseOps(data, MatchOp.make(p, matchKind));
-            }
-        }
-    }
-
-    @Test(dataProvider = "opMapsIS", dataProviderClass = MapStreamTestDataProvider.class)
-    @SuppressWarnings("unchecked")
-    public void testOpsIS(String name, MapTestData<Integer, String> data) {
-        for (BiPredicate<?, ?> p : ANY_PREDICATES) {
-            for (MatchOp.MatchKind matchKind : MatchOp.MatchKind.values()) {
-                exerciseOps(data, MatchOp.make((BiPredicate<? super Integer, ? super String>) p, matchKind));
-            }
-        }
-    }
-}
--- a/test-ng/tests/org/openjdk/tests/java/util/streams/ops/ForEachOpTest.java	Thu Oct 18 13:02:45 2012 -0700
+++ b/test-ng/tests/org/openjdk/tests/java/util/streams/ops/ForEachOpTest.java	Thu Oct 18 18:19:53 2012 -0400
@@ -24,9 +24,7 @@
  */
 package org.openjdk.tests.java.util.streams.ops;
 
-import java.util.Map;
 import java.util.ArrayList;
-import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.streams.ops.ForEachOp;
@@ -34,7 +32,6 @@
 import org.testng.annotations.Test;
 
 import static org.openjdk.tests.java.util.LambdaTestHelpers.*;
-import org.openjdk.tests.java.util.streams.MapStreamTestDataProvider;
 
 /**
  * ForEachOpTest
@@ -50,14 +47,6 @@
         assertEquals(sum.get(), 55);
     }
 
-    public void testForEachMapParallel() {
-        AtomicInteger count = new AtomicInteger(0);
-        AtomicInteger sum = new AtomicInteger(0);
-        countTo(10).parallel().mapped(e -> e).forEach( (k,v) -> { count.incrementAndGet(); sum.addAndGet(k); });
-        assertEquals(count.get(), 10);
-        assertEquals(sum.get(), 55);
-    }
-
     public void testForEachStream() {
         List<Integer> counted = countTo(10);
         List<Integer> eached = new ArrayList<>();
@@ -65,31 +54,10 @@
         assertContents(eached.iterator(), counted.iterator());
     }
 
-    public void testForEachMapStream() {
-        Map<Integer,String> teed = new LinkedHashMap<>();
-        Map<Integer,String> eached = new LinkedHashMap<>();
-        countTo(10).stream().mapped( e -> Integer.toString(e)).tee( (k,v) -> { teed.put(k,v); }).forEach( (k,v) -> { eached.put(k,v); });
-        assertContents(eached.iterator(), teed.iterator());
-    }
-
     @Test(dataProvider = "opArrays", dataProviderClass = StreamTestDataProvider.class)
     @SuppressWarnings("unchecked")
     public void testOps(String name, TestData<Integer> data) {
        Object result = exerciseOps(data, ForEachOp.<Integer>make(bEmpty));
        assertEquals(result, null);
     }
-
-    @Test(dataProvider = "opMapsII", dataProviderClass = MapStreamTestDataProvider.class)
-    @SuppressWarnings("unchecked")
-    public void testOpsII(String name, MapTestData<Integer,Integer> data) {
-        Object result = exerciseOps(data, ForEachOp.<Integer,Integer>make(bBiEmpty));
-        assertEquals(result, null);
-    }
-
-    @Test(dataProvider = "opMapsIS", dataProviderClass = MapStreamTestDataProvider.class)
-    @SuppressWarnings("unchecked")
-    public void testOpsIS(String name, MapTestData<Integer,String> data) {
-        Object result = exerciseOps(data, ForEachOp.<Integer,String>make(bBiEmpty));
-        assertEquals(result, null);
-    }
 }
--- a/test-ng/tests/org/openjdk/tests/java/util/streams/ops/MapExtractKeysOpTest.java	Thu Oct 18 13:02:45 2012 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package org.openjdk.tests.java.util.streams.ops;
-
-import org.openjdk.tests.java.util.streams.StreamTestDataProvider;
-import org.testng.annotations.Test;
-
-import java.util.streams.ops.MapExtractKeysOp;
-import java.util.streams.ops.MappedOp;
-
-import static org.openjdk.tests.java.util.LambdaTestHelpers.mDoubler;
-
-/**
- * MapExtractKeysOpTest
- *
- * @author Brian Goetz
- */
-public class MapExtractKeysOpTest extends StreamOpTestCase {
-    @Test(dataProvider = "opArrays", dataProviderClass = StreamTestDataProvider.class)
-    public void testOps(String name, TestData<Integer> data) {
-        StreamResult<Integer> ref = exerciseOps(data);
-        StreamResult<Integer> result = exerciseOps(data, new MappedOp<>(mDoubler), new MapExtractKeysOp<>());
-        assertEquals(ref, result);
-    }
-}
--- a/test-ng/tests/org/openjdk/tests/java/util/streams/ops/MapExtractValuesOpTest.java	Thu Oct 18 13:02:45 2012 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package org.openjdk.tests.java.util.streams.ops;
-
-import org.openjdk.tests.java.util.streams.StreamTestDataProvider;
-import org.testng.annotations.Test;
-
-import java.util.streams.ops.MapExtractKeysOp;
-import java.util.streams.ops.MapExtractValuesOp;
-import java.util.streams.ops.MapOp;
-import java.util.streams.ops.MappedOp;
-
-import static org.openjdk.tests.java.util.LambdaTestHelpers.mDoubler;
-
-/**
- * MapExtractValuesTest
- *
- * @author Brian Goetz
- */
-public class MapExtractValuesOpTest extends StreamOpTestCase {
-    @Test(dataProvider = "opArrays", dataProviderClass = StreamTestDataProvider.class)
-    public void testOps(String name, TestData<Integer> data) {
-        StreamResult<Integer> ref = exerciseOps(data, new MapOp<>(mDoubler));
-        StreamResult<Integer> result = exerciseOps(data, new MappedOp<>(mDoubler), new MapExtractValuesOp<>());
-        assertEquals(ref, result);
-    }
-}
--- a/test-ng/tests/org/openjdk/tests/java/util/streams/ops/StreamOpTestCase.java	Thu Oct 18 13:02:45 2012 -0700
+++ b/test-ng/tests/org/openjdk/tests/java/util/streams/ops/StreamOpTestCase.java	Thu Oct 18 18:19:53 2012 -0400
@@ -29,16 +29,12 @@
 import org.testng.annotations.Test;
 
 import java.util.*;
-import java.util.Map;
-import java.util.Mapping;
-import java.util.concurrent.ForkJoinTask;
-import java.util.concurrent.ForkJoinUtils;
 import java.util.functions.BiPredicate;
-import java.util.functions.BiBlock;
 import java.util.functions.Block;
 import java.util.functions.Factory;
 import java.util.streams.*;
-import java.util.streams.ops.*;
+import java.util.streams.ops.IntermediateOp;
+import java.util.streams.ops.TerminalOp;
 
 /**
  * StreamOpTestCase
@@ -67,7 +63,7 @@
             }
 
             <T> void run(TestData<T> data, Sink sink, IntermediateOp[] ops) {
-                Sink<T, ?, ?> wrapped = sink(sink, ops);
+                Sink<T> wrapped = sink(sink, ops);
                 wrapped.begin(data.size());
                 data.forEach(wrapped);
                 wrapped.end();
@@ -81,7 +77,7 @@
             }
 
             <T> void run(TestData<T> data, Sink sink, IntermediateOp[] ops) {
-                Sink<T, ?, ?> wrapped = sink(sink, ops);
+                Sink<T> wrapped = sink(sink, ops);
                 wrapped.begin(-1);
                 data.forEach(wrapped);
                 wrapped.end();
@@ -268,7 +264,7 @@
     @SuppressWarnings("unchecked")
     private static<T> void assertMatches(StreamResult<T> refResult,
                                          BiPredicate<Iterable<T>, Iterable<T>> equalator,
-                                         Block<Sink<T,?,?>> block,
+                                         Block<Sink<T>> block,
                                          String message) {
         StreamResult<T> newResult = new StreamResult<>(refResult.size());
         block.apply(newResult);
@@ -365,85 +361,6 @@
         return refResult;
     }
 
-    @SuppressWarnings("rawtypes")
-    protected <K, V, U> U exerciseOps(MapTestData<K,V> data, TerminalOp<Mapping<K,V>, U> terminal) {
-        return exerciseOps(data, terminal, new IntermediateOp[0]);
-    }
-
-    @SuppressWarnings("rawtypes")
-    protected <K, V, U> U exerciseOps(MapTestData<K,V> data, TerminalOp<Mapping<K,V>, U> terminal, IntermediateOp... ops) {
-        // @@@ Compiler bug if lambda literal used. Fine as a local.
-        BiPredicate<U,U> equalator = (u, v) -> Objects.equals(u,v);
-        return exerciseOps(data, equalator, terminal, ops);
-    }
-
-    @SuppressWarnings({ "raw", "unchecked" })
-    protected static <K, V, U> U exerciseOps(MapTestData<K,V> data,
-                                             BiPredicate<U, U> equalator,
-                                             TerminalOp<Mapping<K,V>, U> terminalOp,
-                                             IntermediateOp... ops) {
-
-        // Cache the elements output from the intermediate ops pipeline
-        // Ensure output order is preserved
-        LinkedHashMap<K, V> elements = mapStream((AbstractPipeline<?, Mapping<K,V>>)data.seq(ops)).into(new LinkedHashMap<K, V>());
-
-        // Single sequential, result is the reference result
-        // This may push or pull depending on the terminal op implementation
-        U refResult = chain((AbstractPipeline<?, Mapping<K,V>>)elements.stream(), terminalOp);
-
-        if (terminalOp.isShortCircuit()) {
-            // @@@ How to verify if the stream was short-circuited, or at least the iterator was used?
-        }
-
-        // Single sequential using pull
-        {
-            AbstractPipeline<?, Mapping<K,V>> ap = (AbstractPipeline<?, Mapping<K,V>>)elements.stream();
-            // Force pull by requesting iterator
-            // @@@ seems fragile is there a better way?
-            ap.iterator();
-            U result = ap.pipeline(terminalOp);
-            assertTrue(equalator.test(refResult, result), String.format("Single sequential pull: %s != %s", refResult, result));
-        }
-
-        // Single parallel
-        {
-            // @@@ This is currently redundant, no parallal implementation for LinkedHashMap
-            //     Need to use ArrayList<Mapping<K, V>> that can be transformed to MapTraversable<K, V>
-            //     This will also make it easier to share this method between shapes
-            U result = chain((AbstractPipeline<?, Mapping<K,V>>)elements.parallel(), terminalOp);
-            assertTrue(equalator.test(refResult, result), String.format("Single parallel: %s != %s", refResult, result));
-        }
-
-        // All sequential
-        // This may push or pull depending on the terminal op implementation
-        {
-            U result = data.seq(terminalOp, ops);
-            assertTrue(equalator.test(refResult, result), String.format("All sequential: %s != %s", refResult, result));
-
-            if (isShortCircuit(terminalOp, ops)) {
-                // @@@ How to verify if the stream was short-circuited, or at least the iterator was used?
-            }
-        }
-
-        // All sequential using pull
-        {
-            AbstractPipeline<?, Mapping<K,V>> ap = (AbstractPipeline<?, Mapping<K,V>>)data.seq(ops);
-            // Force pull by requesting iterator
-            // @@@ seems fragile is there a better way?
-            ap.iterator();
-            U result = ap.pipeline(terminalOp);
-            assertTrue(equalator.test(refResult, result), String.format("All sequential pull: %s != %s", refResult, result));
-        }
-
-        // All parallel
-        {
-            U resultPar = data.par(terminalOp, ops);
-            assertTrue(equalator.test(refResult, resultPar), String.format("All parallel: %s != %s", refResult, resultPar));
-        }
-
-        return refResult;
-    }
-
     static class StreamResult<T> implements Sink.OfValue<T>, Traversable<T>, Sized {
 
         private T[] array;
@@ -523,7 +440,6 @@
     private static<T> AbstractPipeline<?, T> chain(AbstractPipeline pipe, IntermediateOp<?, T> op) {
         switch (op.outputShape()) {
             case VALUE: return new ValuePipeline(pipe, op);
-            case KEY_VALUE: return new MapPipeline(pipe, op);
             default: throw new IllegalStateException(op.outputShape().toString());
         }
     }
@@ -532,7 +448,6 @@
     private static<U> U chain(AbstractPipeline pipe, TerminalOp<?, U> op) {
         switch (pipe.getShape()) {
             case VALUE: return (U) ((ValuePipeline) pipe).pipeline(op);
-            case KEY_VALUE: return (U) ((MapPipeline) pipe).pipeline(op);
             default: throw new IllegalStateException(pipe.getShape().toString());
         }
     }
@@ -556,11 +471,6 @@
         return (Stream<U>) pipe;
     }
 
-    @SuppressWarnings({ "rawtypes", "unchecked" })
-    protected static<K,V> MapStream<K,V> mapStream(AbstractPipeline<?, Mapping<K,V>> pipe) {
-        return (MapStream<K,V>) pipe;
-    }
-
     @SuppressWarnings("rawtypes")
     protected static Sink sink(Sink sink, IntermediateOp[] ops) {
         for (int i=ops.length-1; i >= 0; i--)
@@ -753,85 +663,4 @@
             return (AbstractPipeline<?, T>) Streams.stream(collection, -1);
         }
     }
-
-    public static class MapTestData<K,V> implements TestData<Mapping<K,V>> {
-        protected final Map<K,V> map;
-
-        public MapTestData(Map<K,V> map) {
-            this.map = map;
-        }
-
-        @Override
-        @SuppressWarnings({ "rawtypes", "unchecked" })
-        public AbstractPipeline<?, Mapping<K,V>> seq() {
-            return (AbstractPipeline<?, Mapping<K,V>>) map.stream();
-        }
-
-        @Override
-        @SuppressWarnings({ "rawtypes", "unchecked" })
-        public AbstractPipeline<?, Mapping<K,V>> par() {
-            return (AbstractPipeline<?, Mapping<K,V>>) map.parallel();
-        }
-
-        @Override
-        public MapIterator<K,V> iterator() {
-            return map.iterator();
-        }
-
-        @Override
-        @SuppressWarnings({ "rawtypes", "unchecked" })
-        public Spliterator<Mapping<K,V>> spliterator() {
-            // @@@ FIXME!
-            return Arrays.spliterator((Mapping<K,V>[]) map.entrySet().toArray());
-        }
-
-        @Override
-        public void forEach(Block<? super Mapping<K,V>> block) {
-            map.forEach((k, v) -> block.apply(new Mapping.AbstractMapping<K,V>() {
-                @Override
-                public K getKey() {
-                    return k;
-                }
-
-                @Override
-                public V getValue() {
-                    return v;
-                }
-            }));
-        }
-
-        public void forEach(BiBlock<? super K, ? super V> block) {
-            map.forEach(block);
-        }
-
-        @Override
-        public int size() {
-            return map.size();
-        }
-
-        @Override
-        public String toString() {
-            return map.toString();
-        }
-    }
-
-    public static class MapTestDataOfUnknownSize<K,V> extends MapTestData<K,V> {
-
-        public MapTestDataOfUnknownSize(Map<K,V> map) {
-            super(map);
-        }
-
-        @Override
-        public boolean isStreamOfUnknownSize() {
-            return true;
-        }
-
-        @Override
-        @SuppressWarnings({ "rawtypes", "unchecked" })
-        public AbstractPipeline<?, Mapping<K,V>> seq() {
-            return (AbstractPipeline<?, Mapping<K,V>>) Streams.stream(map, -1);
-        }
-
-    }
-
 }
--- a/test-ng/tests/org/openjdk/tests/separate/SourceModel.java	Thu Oct 18 13:02:45 2012 -0700
+++ b/test-ng/tests/org/openjdk/tests/separate/SourceModel.java	Thu Oct 18 18:19:53 2012 -0400
@@ -228,16 +228,11 @@
             if (superclass != null) {
                 dependencies.put(superclass.getName(), superclass);
             }
-            getSupertypes().stream()
-                           .map(x->x.getType())
-                           .mapped(x -> x.getName())
-                           .swap()
-                           .into(dependencies);
-            // Do these last so that they override 
-            this.typeDependencies.stream()
-                    .mapped(x->x.getName())
-                    .swap()
-                    .into(dependencies);
+            for (Extends e : getSupertypes())
+                dependencies.put(e.getType().getName(), e.getType());
+            // Do these last so that they override
+            for (Type t : this.typeDependencies)
+                dependencies.put(t.getName(), t);
             return dependencies.values();
         }
     }