Skip to content

Commit 3334e28

Browse files
committed
remove pieces specific to old 2.12 HashMap implementation
I suppose we ought to replace this instead of just remove it? but for now, I'm just trying to get the 2.13 community build green for 2.13.0-M5
1 parent de523ad commit 3334e28

File tree

5 files changed

+0
-317
lines changed

5 files changed

+0
-317
lines changed

src/main/java/scala/compat/java8/ScalaStreamSupport.java

Lines changed: 0 additions & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -32,43 +32,6 @@ public static <T> Stream<T> stream(scala.collection.IndexedSeq<T> coll) {
3232
return StreamSupport.stream(new StepsAnyIndexedSeq<T>((scala.collection.IndexedSeq)coll, 0, coll.length()), false);
3333
}
3434

35-
/**
36-
* Generates a Stream that traverses the keys of a scala.collection.immutable.HashMap.
37-
* <p>
38-
* Both sequential and parallel operations will be efficient.
39-
*
40-
* @param coll The immutable.HashMap to traverse
41-
* @return A Stream view of the collection which, by default, executes sequentially.
42-
*/
43-
public static <K> Stream<K> streamKeys(scala.collection.immutable.HashMap<K, ? super Object> coll) {
44-
return StreamSupport.stream(new StepsAnyImmHashMapKey<K, Object>(coll, 0, coll.size()), false);
45-
}
46-
47-
/**
48-
* Generates a Stream that traverses the values of a scala.collection.immutable.HashMap.
49-
* <p>
50-
* Both sequential and parallel operations will be efficient.
51-
*
52-
* @param coll The immutable.HashMap to traverse
53-
* @return A Stream view of the collection which, by default, executes sequentially.
54-
*/
55-
public static <V> Stream<V> streamValues(scala.collection.immutable.HashMap<? super Object, V> coll) {
56-
return StreamSupport.stream(new StepsAnyImmHashMapValue<Object, V>(coll, 0, coll.size()), false);
57-
}
58-
59-
/**
60-
* Generates a Stream that traverses the key-value pairs of a scala.collection.immutable.HashMap.
61-
* The key-value pairs are presented as instances of scala.Tuple2.
62-
* <p>
63-
* Both sequential and parallel operations will be efficient.
64-
*
65-
* @param coll The immutable.HashMap to traverse
66-
* @return A Stream view of the collection which, by default, executes sequentially.
67-
*/
68-
public static <K, V> Stream< scala.Tuple2<K, V> > stream(scala.collection.immutable.HashMap<K, V> coll) {
69-
return StreamSupport.stream(new StepsAnyImmHashMap<K, V>(coll, 0, coll.size()), false);
70-
}
71-
7235
/**
7336
* Generates a Stream that traverses a scala.collection.immutable.HashSet.
7437
* <p>
@@ -275,30 +238,6 @@ public static DoubleStream doubleStream(scala.collection.IndexedSeq<Double> coll
275238
return StreamSupport.doubleStream(new StepsDoubleIndexedSeq(coll, 0, coll.length()), false);
276239
}
277240

278-
/**
279-
* Generates a DoubleStream that traverses double-valued keys of a scala.collection.immutable.HashMap.
280-
* <p>
281-
* Both sequential and parallel operations will be efficient.
282-
*
283-
* @param coll The immutable.HashMap to traverse
284-
* @return A DoubleStream view of the collection which, by default, executes sequentially.
285-
*/
286-
public static DoubleStream doubleStreamKeys(scala.collection.immutable.HashMap<Double, ? super Object> coll) {
287-
return StreamSupport.doubleStream(new StepsDoubleImmHashMapKey(coll, 0, coll.size()), false);
288-
}
289-
290-
/**
291-
* Generates a DoubleStream that traverses double-valued values of a scala.collection.immutable.HashMap.
292-
* <p>
293-
* Both sequential and parallel operations will be efficient.
294-
*
295-
* @param coll The immutable.HashMap to traverse
296-
* @return A DoubleStream view of the collection which, by default, executes sequentially.
297-
*/
298-
public static DoubleStream doubleStreamValues(scala.collection.immutable.HashMap<? super Object, Double> coll) {
299-
return StreamSupport.doubleStream(new StepsDoubleImmHashMapValue(coll, 0, coll.size()), false);
300-
}
301-
302241
/**
303242
* Generates a DoubleStream that traverses a scala.collection.immutable.HashSet of Doubles.
304243
* <p>
@@ -511,30 +450,6 @@ public static IntStream intStream(scala.collection.IndexedSeq<Integer> coll) {
511450
return StreamSupport.intStream(new StepsIntIndexedSeq(coll, 0, coll.length()), false);
512451
}
513452

514-
/**
515-
* Generates a IntStream that traverses int-valued keys of a scala.collection.immutable.HashMap.
516-
* <p>
517-
* Both sequential and parallel operations will be efficient.
518-
*
519-
* @param coll The immutable.HashMap to traverse
520-
* @return A IntStream view of the collection which, by default, executes sequentially.
521-
*/
522-
public static IntStream intStreamKeys(scala.collection.immutable.HashMap<Integer, ? super Object> coll) {
523-
return StreamSupport.intStream(new StepsIntImmHashMapKey(coll, 0, coll.size()), false);
524-
}
525-
526-
/**
527-
* Generates a IntStream that traverses int-valued values of a scala.collection.immutable.HashMap.
528-
* <p>
529-
* Both sequential and parallel operations will be efficient.
530-
*
531-
* @param coll The immutable.HashMap to traverse
532-
* @return A IntStream view of the collection which, by default, executes sequentially.
533-
*/
534-
public static IntStream intStreamValues(scala.collection.immutable.HashMap<? super Object, Integer> coll) {
535-
return StreamSupport.intStream(new StepsIntImmHashMapValue(coll, 0, coll.size()), false);
536-
}
537-
538453
/**
539454
* Generates a IntStream that traverses a scala.collection.immutable.HashSet of Ints.
540455
* <p>
@@ -720,30 +635,6 @@ public static LongStream longStream(scala.collection.IndexedSeq<Long> coll) {
720635
return StreamSupport.longStream(new StepsLongIndexedSeq(coll, 0, coll.length()), false);
721636
}
722637

723-
/**
724-
* Generates a LongStream that traverses long-valued keys of a scala.collection.immutable.HashMap.
725-
* <p>
726-
* Both sequential and parallel operations will be efficient.
727-
*
728-
* @param coll The immutable.HashMap to traverse
729-
* @return A LongStream view of the collection which, by default, executes sequentially.
730-
*/
731-
public static LongStream longStreamKeys(scala.collection.immutable.HashMap<Long, ? super Object> coll) {
732-
return StreamSupport.longStream(new StepsLongImmHashMapKey(coll, 0, coll.size()), false);
733-
}
734-
735-
/**
736-
* Generates a LongStream that traverses long-valued values of a scala.collection.immutable.HashMap.
737-
* <p>
738-
* Both sequential and parallel operations will be efficient.
739-
*
740-
* @param coll The immutable.HashMap to traverse
741-
* @return A LongStream view of the collection which, by default, executes sequentially.
742-
*/
743-
public static LongStream longStreamValues(scala.collection.immutable.HashMap<? super Object, Long> coll) {
744-
return StreamSupport.longStream(new StepsLongImmHashMapValue(coll, 0, coll.size()), false);
745-
}
746-
747638
/**
748639
* Generates a LongStream that traverses a scala.collection.immutable.HashSet of Longs.
749640
* <p>

src/main/scala/scala/compat/java8/converterImpl/StepConverters.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ trait Priority1StepConverters extends Priority2StepConverters {
3131
new RichHashSetCanStep[A](underlying)
3232
implicit def richIteratorCanStep[A](underlying: Iterator[A]): RichIteratorCanStep[A] =
3333
new RichIteratorCanStep(underlying)
34-
implicit def richImmHashMapCanStep[K, V](underlying: collection.immutable.HashMap[K, V]): RichImmHashMapCanStep[K, V] =
35-
new RichImmHashMapCanStep[K, V](underlying)
3634
implicit def richImmHashSetCanStep[A](underlying: collection.immutable.HashSet[A]): RichImmHashSetCanStep[A] =
3735
new RichImmHashSetCanStep[A](underlying)
3836
implicit def richNumericRangeCanStep[T](underlying: collection.immutable.NumericRange[T]): RichNumericRangeCanStep[T] =

src/main/scala/scala/compat/java8/converterImpl/StepsImmHashMap.scala

Lines changed: 0 additions & 144 deletions
This file was deleted.

src/main/scala/scala/compat/java8/converterImpl/StepsLikeImmHashMap.scala

Lines changed: 0 additions & 53 deletions
This file was deleted.

src/test/scala/scala/compat/java8/StepConvertersTest.scala

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,6 @@ class StepConvertersTest {
104104
Okay( (ci.HashMap[String, String]("fish" -> "salmon"): ci.AbstractMap[String, String]).stepper )
105105
Okay( (ci.HashMap[String, String]("fish" -> "salmon"): ci.AbstractMap[String, String]).keyStepper )
106106
Okay( (ci.HashMap[String, String]("fish" -> "salmon"): ci.AbstractMap[String, String]).valueStepper )
107-
good( ci.HashMap[String, String]("fish" -> "salmon").stepper )
108-
good( ci.HashMap[String, String]("fish" -> "salmon").keyStepper )
109-
good( ci.HashMap[String, String]("fish" -> "salmon").valueStepper )
110107
good( ci.HashSet[String]("salmon").stepper )
111108
good( ci.IndexedSeq[String]("salmon").stepper )
112109
Okay( ci.IntMap[String](123456 -> "salmon").stepper )
@@ -232,8 +229,6 @@ class StepConvertersTest {
232229
Okay( ci.::(3.14159, Nil).stepper )
233230
Okay( (ci.HashMap[Double, Double](2.718281828 -> 3.14159): ci.AbstractMap[Double, Double]).keyStepper )
234231
Okay( (ci.HashMap[Double, Double](2.718281828 -> 3.14159): ci.AbstractMap[Double, Double]).valueStepper )
235-
good( ci.HashMap[Double, Double](2.718281828 -> 3.14159).keyStepper )
236-
good( ci.HashMap[Double, Double](2.718281828 -> 3.14159).valueStepper )
237232
good( ci.HashSet[Double](3.14159).stepper )
238233
good( ci.IndexedSeq[Double](3.14159).stepper )
239234
Okay( ci.IntMap[Double](123456 -> 3.14159).valueStepper )
@@ -350,8 +345,6 @@ class StepConvertersTest {
350345
Okay( ci.::(654321, Nil).stepper )
351346
Okay( (ci.HashMap[Int, Int](0xDEEDED -> 654321): ci.AbstractMap[Int, Int]).keyStepper )
352347
Okay( (ci.HashMap[Int, Int](0xDEEDED -> 654321): ci.AbstractMap[Int, Int]).valueStepper )
353-
good( ci.HashMap[Int, Int](0xDEEDED -> 654321).keyStepper )
354-
good( ci.HashMap[Int, Int](0xDEEDED -> 654321).valueStepper )
355348
good( ci.HashSet[Int](654321).stepper )
356349
good( ci.IndexedSeq[Int](654321).stepper )
357350
Okay( ci.IntMap[Int](123456 -> 654321).keyStepper )
@@ -483,8 +476,6 @@ class StepConvertersTest {
483476
Okay( ci.::(0x123456789L, Nil).stepper )
484477
Okay( (ci.HashMap[Long, Long](1234567654321L -> 0x123456789L): ci.AbstractMap[Long, Long]).keyStepper )
485478
Okay( (ci.HashMap[Long, Long](1234567654321L -> 0x123456789L): ci.AbstractMap[Long, Long]).valueStepper )
486-
good( ci.HashMap[Long, Long](1234567654321L -> 0x123456789L).keyStepper )
487-
good( ci.HashMap[Long, Long](1234567654321L -> 0x123456789L).valueStepper )
488479
good( ci.HashSet[Long](0x123456789L).stepper )
489480
good( ci.IndexedSeq[Long](0x123456789L).stepper )
490481
Okay( ci.IntMap[Long](123456 -> 0x123456789L).valueStepper )

0 commit comments

Comments
 (0)