Skip to content

Commit 86370b0

Browse files
committed
Reorganized namespaces for Stream compatibility.
Basically, everything to do with conversion is in conversionImpl, while actual collection classes are in collectionImpl. Most everything in here should be private[java8], but it probably isn't yet.
1 parent 043672b commit 86370b0

29 files changed

+83
-70
lines changed

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package scala.compat.java8;
22

3-
import scala.compat.java8.converterImpls.*;
3+
import scala.compat.java8.converterImpl.*;
4+
import scala.compat.java8.collectionImpl.*;
45
import java.util.stream.*;
56
import scala.compat.java8.runtime.CollectionInternals;
67

@@ -471,8 +472,8 @@ public static DoubleStream doubleFromAccumulatedValues(scala.collection.Map<?, D
471472
*/
472473
public static IntStream intFrom(scala.collection.BitSet coll) {
473474
// Let the value class figure out the casting!
474-
scala.compat.java8.converterImpls.RichBitSetCanStep rbscs =
475-
new scala.compat.java8.converterImpls.RichBitSetCanStep(coll);
475+
scala.compat.java8.converterImpl.RichBitSetCanStep rbscs =
476+
new scala.compat.java8.converterImpl.RichBitSetCanStep(coll);
476477
return StreamSupport.intStream(rbscs.stepper(), false);
477478
}
478479

@@ -485,7 +486,7 @@ public static IntStream intFrom(scala.collection.BitSet coll) {
485486
* @return A IntStream view of the collection which, by default, executes sequentially.
486487
*/
487488
public static IntStream intFrom(scala.collection.immutable.Range coll) {
488-
return StreamSupport.intStream(new scala.compat.java8.converterImpls.StepsIntRange(coll, 0, coll.length()), false);
489+
return StreamSupport.intStream(new scala.compat.java8.converterImpl.StepsIntRange(coll, 0, coll.length()), false);
489490
}
490491

491492
/**

src/main/scala/scala/compat/java8/StreamConverters.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import language.implicitConversions
44

55
import java.util.stream._
66
import scala.compat.java8.collectionImpl._
7-
import scala.compat.java8.converterImpls._
7+
import scala.compat.java8.converterImpl._
88

99
trait PrimitiveStreamAccumulator[S, AA] {
1010
def streamAccumulate(stream: S): AA
@@ -197,8 +197,8 @@ trait Priority1StreamConverters extends Priority2StreamConverters {
197197
*/
198198
object StreamConverters
199199
extends Priority1StreamConverters
200-
with converterImpls.Priority1StepConverters
201-
with converterImpls.Priority1AccumulatorConverters
200+
with converterImpl.Priority1StepConverters
201+
with converterImpl.Priority1AccumulatorConverters
202202
{
203203
implicit class EnrichDoubleArrayWithStream(a: Array[Double]) {
204204
def seqStream: DoubleStream = java.util.Arrays.stream(a)

src/main/scala/scala/compat/java8/collectionImpl/Stepper.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ trait Stepper[@specialized(Double, Int, Long) A] extends StepperLike[A, Stepper[
4242
*
4343
* Note: accumulation will occur sequentially. To accumulate in parallel, use a `Stream` (i.e. `.parStream.accumulate`).
4444
*/
45-
def accumulate[Acc <: AccumulatorLike[A, Acc]](implicit accer: scala.compat.java8.converterImpls.AccumulatesFromStepper[A, Acc]) = accer(this)
45+
def accumulate[Acc <: AccumulatorLike[A, Acc]](implicit accer: scala.compat.java8.converterImpl.AccumulatesFromStepper[A, Acc]) = accer(this)
4646
}
4747

4848
/** An (optional) marker trait that indicates that a `Stepper` can call `substep` with

src/main/scala/scala/compat/java8/collectionImpl/Accumulates.scala renamed to src/main/scala/scala/compat/java8/converterImpl/Accumulates.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package scala.compat.java8.converterImpls
1+
package scala.compat.java8.converterImpl
22

33
import language.implicitConversions
44

src/main/scala/scala/compat/java8/collectionImpl/AccumulatorConverters.scala renamed to src/main/scala/scala/compat/java8/converterImpl/AccumulatorConverters.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package scala.compat.java8.converterImpls
1+
package scala.compat.java8.converterImpl
22

33
import language.implicitConversions
44

src/main/scala/scala/compat/java8/collectionImpl/MakesSteppers.scala renamed to src/main/scala/scala/compat/java8/converterImpl/MakesSteppers.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package scala.compat.java8.converterImpls
1+
package scala.compat.java8.converterImpl
22

33
import language.implicitConversions
44

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package scala.compat.java8.converterImpls
1+
package scala.compat.java8.converterImpl
22

33
import language.implicitConversions
44

src/main/scala/scala/compat/java8/collectionImpl/StepsArray.scala renamed to src/main/scala/scala/compat/java8/converterImpl/StepsArray.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package scala.compat.java8.converterImpls
1+
package scala.compat.java8.converterImpl
22

33
import language.implicitConversions
44

src/main/scala/scala/compat/java8/collectionImpl/StepsBitSet.scala renamed to src/main/scala/scala/compat/java8/converterImpl/StepsBitSet.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package scala.compat.java8.converterImpls
1+
package scala.compat.java8.converterImpl
22

33
import language.implicitConversions
44

src/main/scala/scala/compat/java8/collectionImpl/StepsFlatHashTable.scala renamed to src/main/scala/scala/compat/java8/converterImpl/StepsFlatHashTable.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package scala.compat.java8.converterImpls
1+
package scala.compat.java8.converterImpl
22

33
import language.implicitConversions
44

src/main/scala/scala/compat/java8/collectionImpl/StepsHashTable.scala renamed to src/main/scala/scala/compat/java8/converterImpl/StepsHashTable.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package scala.compat.java8.converterImpls
1+
package scala.compat.java8.converterImpl
22

33
import language.implicitConversions
44

src/main/scala/scala/compat/java8/collectionImpl/StepsImmHashMap.scala renamed to src/main/scala/scala/compat/java8/converterImpl/StepsImmHashMap.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package scala.compat.java8.converterImpls
1+
package scala.compat.java8.converterImpl
22

33
import language.implicitConversions
44

src/main/scala/scala/compat/java8/collectionImpl/StepsImmHashSet.scala renamed to src/main/scala/scala/compat/java8/converterImpl/StepsImmHashSet.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package scala.compat.java8.converterImpls
1+
package scala.compat.java8.converterImpl
22

33
import language.implicitConversions
44

src/main/scala/scala/compat/java8/collectionImpl/StepsIndexedSeq.scala renamed to src/main/scala/scala/compat/java8/converterImpl/StepsIndexedSeq.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package scala.compat.java8.converterImpls
1+
package scala.compat.java8.converterImpl
22

33
import language.implicitConversions
44

src/main/scala/scala/compat/java8/collectionImpl/StepsIterable.scala renamed to src/main/scala/scala/compat/java8/converterImpl/StepsIterable.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package scala.compat.java8.converterImpls
1+
package scala.compat.java8.converterImpl
22

33
import language.implicitConversions
44

src/main/scala/scala/compat/java8/collectionImpl/StepsIterator.scala renamed to src/main/scala/scala/compat/java8/converterImpl/StepsIterator.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package scala.compat.java8.converterImpls
1+
package scala.compat.java8.converterImpl
22

33
import language.implicitConversions
44

src/main/scala/scala/compat/java8/collectionImpl/StepsLikeGapped.scala renamed to src/main/scala/scala/compat/java8/converterImpl/StepsLikeGapped.scala

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
package scala.compat.java8.collectionImpl
1+
package scala.compat.java8.converterImpl
22

33
import annotation.tailrec
44

5+
import scala.compat.java8.collectionImpl._
56
import Stepper._
67

78
/** Abstracts all the generic operations of stepping over a backing array
@@ -10,7 +11,7 @@ import Stepper._
1011
* is used as a signal to look for more entries in the array. (This also
1112
* allows a subclass to traverse a sublist by updating `currentEntry`.)
1213
*/
13-
abstract class AbstractStepsLikeGapped[Sub >: Null, Semi <: Sub](protected val underlying: Array[AnyRef], protected var i0: Int, protected var iN: Int) {
14+
private[java8] abstract class AbstractStepsLikeGapped[Sub >: Null, Semi <: Sub](protected val underlying: Array[AnyRef], protected var i0: Int, protected var iN: Int) {
1415
protected var currentEntry: AnyRef = null
1516
def semiclone(half: Int): Semi
1617
def characteristics(): Int = Ordered
@@ -33,7 +34,7 @@ abstract class AbstractStepsLikeGapped[Sub >: Null, Semi <: Sub](protected val u
3334
/** Abstracts the process of stepping through an incompletely filled array of `AnyRefs`
3435
* and interpreting the contents as the elements of a collection.
3536
*/
36-
abstract class StepsLikeGapped[A, STA >: Null <: StepsLikeGapped[A, _]](_underlying: Array[AnyRef], _i0: Int, _iN: Int)
37+
private[java8] abstract class StepsLikeGapped[A, STA >: Null <: StepsLikeGapped[A, _]](_underlying: Array[AnyRef], _i0: Int, _iN: Int)
3738
extends AbstractStepsLikeGapped[AnyStepper[A], STA](_underlying, _i0, _iN)
3839
with AnyStepper[A]
3940
with EfficientSubstep
@@ -43,7 +44,7 @@ abstract class StepsLikeGapped[A, STA >: Null <: StepsLikeGapped[A, _]](_underly
4344
* and interpreting the contents as the elements of a collection of `Double`s. Subclasses
4445
* are responsible for unboxing the `AnyRef` inside `nextDouble`.
4546
*/
46-
abstract class StepsDoubleLikeGapped[STD >: Null <: StepsDoubleLikeGapped[_]](_underlying: Array[AnyRef], _i0: Int, _iN: Int)
47+
private[java8] abstract class StepsDoubleLikeGapped[STD >: Null <: StepsDoubleLikeGapped[_]](_underlying: Array[AnyRef], _i0: Int, _iN: Int)
4748
extends AbstractStepsLikeGapped[DoubleStepper, STD](_underlying, _i0, _iN)
4849
with DoubleStepper
4950
with EfficientSubstep
@@ -53,7 +54,7 @@ abstract class StepsDoubleLikeGapped[STD >: Null <: StepsDoubleLikeGapped[_]](_u
5354
* and interpreting the contents as the elements of a collection of `Int`s. Subclasses
5455
* are responsible for unboxing the `AnyRef` inside `nextInt`.
5556
*/
56-
abstract class StepsIntLikeGapped[STI >: Null <: StepsIntLikeGapped[_]](_underlying: Array[AnyRef], _i0: Int, _iN: Int)
57+
private[java8] abstract class StepsIntLikeGapped[STI >: Null <: StepsIntLikeGapped[_]](_underlying: Array[AnyRef], _i0: Int, _iN: Int)
5758
extends AbstractStepsLikeGapped[IntStepper, STI](_underlying, _i0, _iN)
5859
with IntStepper
5960
with EfficientSubstep
@@ -63,7 +64,7 @@ abstract class StepsIntLikeGapped[STI >: Null <: StepsIntLikeGapped[_]](_underly
6364
* and interpreting the contents as the elements of a collection of `Long`s. Subclasses
6465
* are responsible for unboxing the `AnyRef` inside `nextLong`.
6566
*/
66-
abstract class StepsLongLikeGapped[STL >: Null <: StepsLongLikeGapped[_]](_underlying: Array[AnyRef], _i0: Int, _iN: Int)
67+
private[java8] abstract class StepsLongLikeGapped[STL >: Null <: StepsLongLikeGapped[_]](_underlying: Array[AnyRef], _i0: Int, _iN: Int)
6768
extends AbstractStepsLikeGapped[LongStepper, STL](_underlying, _i0, _iN)
6869
with LongStepper
6970
with EfficientSubstep

src/main/scala/scala/compat/java8/collectionImpl/StepsLikeImmHashMap.scala renamed to src/main/scala/scala/compat/java8/converterImpl/StepsLikeImmHashMap.scala

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
package scala.compat.java8.collectionImpl
1+
package scala.compat.java8.converterImpl
22

33
import java.util.Spliterator
4+
5+
import scala.compat.java8.collectionImpl._
46
import Stepper._
57

68
/** Abstracts all the generic operations of stepping over an immutable HashMap by slicing it into pieces.
79
* `next` must update `i` but not `i0` so that later splitting steps can keep track of whether the
810
* collection needs some sort of modification before transmission to the subclass.
911
*/
10-
trait AbstractStepsLikeImmHashMap[K, V, A, Sub >: Null, Semi >: Null <: Sub with AbstractStepsLikeImmHashMap[K, V, A, Sub, _]]
12+
private[java8] trait AbstractStepsLikeImmHashMap[K, V, A, Sub >: Null, Semi >: Null <: Sub with AbstractStepsLikeImmHashMap[K, V, A, Sub, _]]
1113
extends AbstractStepsLikeSliced[collection.immutable.HashMap[K, V], Sub, Semi] {
1214
protected var theIterator: Iterator[A] = null
1315
protected def demiclone(u: collection.immutable.HashMap[K,V], j0: Int, jN: Int): Semi
@@ -32,22 +34,22 @@ extends AbstractStepsLikeSliced[collection.immutable.HashMap[K, V], Sub, Semi] {
3234
}
3335
}
3436

35-
abstract class StepsLikeImmHashMap[K, V, A, SIHM >: Null <: StepsLikeImmHashMap[K, V, A, _]](_underlying: collection.immutable.HashMap[K, V], _i0: Int, _iN: Int)
37+
private[java8] abstract class StepsLikeImmHashMap[K, V, A, SIHM >: Null <: StepsLikeImmHashMap[K, V, A, _]](_underlying: collection.immutable.HashMap[K, V], _i0: Int, _iN: Int)
3638
extends StepsLikeSliced[A, collection.immutable.HashMap[K, V], SIHM](_underlying, _i0, _iN)
3739
with AbstractStepsLikeImmHashMap[K, V, A, AnyStepper[A], SIHM]
3840
{}
3941

40-
abstract class StepsDoubleLikeImmHashMap[K, V, SIHM >: Null <: StepsDoubleLikeImmHashMap[K, V, SIHM]](_underlying: collection.immutable.HashMap[K, V], _i0: Int, _iN: Int)
42+
private[java8] abstract class StepsDoubleLikeImmHashMap[K, V, SIHM >: Null <: StepsDoubleLikeImmHashMap[K, V, SIHM]](_underlying: collection.immutable.HashMap[K, V], _i0: Int, _iN: Int)
4143
extends StepsDoubleLikeSliced[collection.immutable.HashMap[K, V], SIHM](_underlying, _i0, _iN)
4244
with AbstractStepsLikeImmHashMap[K, V, Double, DoubleStepper, SIHM]
4345
{}
4446

45-
abstract class StepsIntLikeImmHashMap[K, V, SIHM >: Null <: StepsIntLikeImmHashMap[K, V, SIHM]](_underlying: collection.immutable.HashMap[K, V], _i0: Int, _iN: Int)
47+
private[java8] abstract class StepsIntLikeImmHashMap[K, V, SIHM >: Null <: StepsIntLikeImmHashMap[K, V, SIHM]](_underlying: collection.immutable.HashMap[K, V], _i0: Int, _iN: Int)
4648
extends StepsIntLikeSliced[collection.immutable.HashMap[K, V], SIHM](_underlying, _i0, _iN)
4749
with AbstractStepsLikeImmHashMap[K, V, Int, IntStepper, SIHM]
4850
{}
4951

50-
abstract class StepsLongLikeImmHashMap[K, V, SIHM >: Null <: StepsLongLikeImmHashMap[K, V, SIHM]](_underlying: collection.immutable.HashMap[K, V], _i0: Int, _iN: Int)
52+
private[java8] abstract class StepsLongLikeImmHashMap[K, V, SIHM >: Null <: StepsLongLikeImmHashMap[K, V, SIHM]](_underlying: collection.immutable.HashMap[K, V], _i0: Int, _iN: Int)
5153
extends StepsLongLikeSliced[collection.immutable.HashMap[K, V], SIHM](_underlying, _i0, _iN)
5254
with AbstractStepsLikeImmHashMap[K, V, Long, LongStepper, SIHM]
5355
{}

src/main/scala/scala/compat/java8/collectionImpl/StepsLikeIndexed.scala renamed to src/main/scala/scala/compat/java8/converterImpl/StepsLikeIndexed.scala

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
package scala.compat.java8.collectionImpl
1+
package scala.compat.java8.converterImpl
22

33
import java.util.Spliterator
4+
5+
import scala.compat.java8.collectionImpl._
46
import Stepper._
57

68
/** Abstracts all the generic operations of stepping over an indexable collection */
7-
abstract class AbstractStepsLikeIndexed[Sub >: Null, Semi <: Sub](protected var i0: Int, protected var iN: Int) {
9+
private[java8] abstract class AbstractStepsLikeIndexed[Sub >: Null, Semi <: Sub](protected var i0: Int, protected var iN: Int) {
810
def semiclone(half: Int): Semi
911
def characteristics(): Int = Ordered + Sized + SubSized
1012
def estimateSize(): Long = iN - i0
@@ -21,28 +23,28 @@ abstract class AbstractStepsLikeIndexed[Sub >: Null, Semi <: Sub](protected var
2123
}
2224

2325
/** Abstracts the operation of stepping over a generic indexable collection */
24-
abstract class StepsLikeIndexed[A, STA >: Null <: StepsLikeIndexed[A, _]](_i0: Int, _iN: Int)
26+
private[java8] abstract class StepsLikeIndexed[A, STA >: Null <: StepsLikeIndexed[A, _]](_i0: Int, _iN: Int)
2527
extends AbstractStepsLikeIndexed[AnyStepper[A], STA](_i0, _iN)
2628
with AnyStepper[A]
2729
with EfficientSubstep
2830
{}
2931

3032
/** Abstracts the operation of stepping over an indexable collection of Doubles */
31-
abstract class StepsDoubleLikeIndexed[STD >: Null <: StepsDoubleLikeIndexed[_]](_i0: Int, _iN: Int)
33+
private[java8] abstract class StepsDoubleLikeIndexed[STD >: Null <: StepsDoubleLikeIndexed[_]](_i0: Int, _iN: Int)
3234
extends AbstractStepsLikeIndexed[DoubleStepper, STD](_i0, _iN)
3335
with DoubleStepper
3436
with EfficientSubstep
3537
{}
3638

3739
/** Abstracts the operation of stepping over an indexable collection of Ints */
38-
abstract class StepsIntLikeIndexed[STI >: Null <: StepsIntLikeIndexed[_]](_i0: Int, _iN: Int)
40+
private[java8] abstract class StepsIntLikeIndexed[STI >: Null <: StepsIntLikeIndexed[_]](_i0: Int, _iN: Int)
3941
extends AbstractStepsLikeIndexed[IntStepper, STI](_i0, _iN)
4042
with IntStepper
4143
with EfficientSubstep
4244
{}
4345

4446
/** Abstracts the operation of stepping over an indexable collection of Longs */
45-
abstract class StepsLongLikeIndexed[STL >: Null <: StepsLongLikeIndexed[_]](_i0: Int, _iN: Int)
47+
private[java8] abstract class StepsLongLikeIndexed[STL >: Null <: StepsLongLikeIndexed[_]](_i0: Int, _iN: Int)
4648
extends AbstractStepsLikeIndexed[LongStepper, STL](_i0, _iN)
4749
with LongStepper
4850
with EfficientSubstep

src/main/scala/scala/compat/java8/collectionImpl/StepsLikeIterator.scala renamed to src/main/scala/scala/compat/java8/converterImpl/StepsLikeIterator.scala

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
package scala.compat.java8.collectionImpl
1+
package scala.compat.java8.converterImpl
22

33
import java.util.Spliterator
4+
5+
import scala.compat.java8.collectionImpl._
46
import Stepper._
57

68
/** Common functionality for Steppers that step through an Iterator, caching the results as needed when a split is requested. */
7-
abstract class AbstractStepsLikeIterator[A, SP >: Null <: Stepper[A], Semi <: SP](final protected var underlying: Iterator[A]) {
9+
private[java8] abstract class AbstractStepsLikeIterator[A, SP >: Null <: Stepper[A], Semi <: SP](final protected var underlying: Iterator[A]) {
810
final protected var nextChunkSize = 16
911
final protected var proxied: SP = null
1012
def semiclone(): Semi // Must initialize with null iterator!
@@ -14,7 +16,7 @@ abstract class AbstractStepsLikeIterator[A, SP >: Null <: Stepper[A], Semi <: SP
1416
}
1517

1618
/** Abstracts the operation of stepping over an iterator (that needs to be cached when splitting) */
17-
abstract class StepsLikeIterator[A, SLI >: Null <: StepsLikeIterator[A, SLI] with AnyStepper[A]](_underlying: Iterator[A])
19+
private[java8] abstract class StepsLikeIterator[A, SLI >: Null <: StepsLikeIterator[A, SLI] with AnyStepper[A]](_underlying: Iterator[A])
1820
extends AbstractStepsLikeIterator[A, AnyStepper[A], SLI](_underlying)
1921
with AnyStepper[A]
2022
{
@@ -37,7 +39,7 @@ abstract class StepsLikeIterator[A, SLI >: Null <: StepsLikeIterator[A, SLI] wit
3739
}
3840

3941
/** Abstracts the operation of stepping over an iterator of Doubles (needs caching when split) */
40-
abstract class StepsDoubleLikeIterator[SLI >: Null <: StepsDoubleLikeIterator[SLI] with DoubleStepper](_underlying: Iterator[Double])
42+
private[java8] abstract class StepsDoubleLikeIterator[SLI >: Null <: StepsDoubleLikeIterator[SLI] with DoubleStepper](_underlying: Iterator[Double])
4143
extends AbstractStepsLikeIterator[Double, DoubleStepper, SLI](_underlying)
4244
with DoubleStepper
4345
{
@@ -60,7 +62,7 @@ abstract class StepsDoubleLikeIterator[SLI >: Null <: StepsDoubleLikeIterator[SL
6062
}
6163

6264
/** Abstracts the operation of stepping over an iterator of Ints (needs caching when split) */
63-
abstract class StepsIntLikeIterator[SLI >: Null <: StepsIntLikeIterator[SLI] with IntStepper](_underlying: Iterator[Int])
65+
private[java8] abstract class StepsIntLikeIterator[SLI >: Null <: StepsIntLikeIterator[SLI] with IntStepper](_underlying: Iterator[Int])
6466
extends AbstractStepsLikeIterator[Int, IntStepper, SLI](_underlying)
6567
with IntStepper
6668
{
@@ -83,7 +85,7 @@ abstract class StepsIntLikeIterator[SLI >: Null <: StepsIntLikeIterator[SLI] wit
8385
}
8486

8587
/** Abstracts the operation of stepping over an iterator of Longs (needs caching when split) */
86-
abstract class StepsLongLikeIterator[SLI >: Null <: StepsLongLikeIterator[SLI] with LongStepper](_underlying: Iterator[Long])
88+
private[java8] abstract class StepsLongLikeIterator[SLI >: Null <: StepsLongLikeIterator[SLI] with LongStepper](_underlying: Iterator[Long])
8789
extends AbstractStepsLikeIterator[Long, LongStepper, SLI](_underlying)
8890
with LongStepper
8991
{

src/main/scala/scala/compat/java8/collectionImpl/StepsLikeSliced.scala renamed to src/main/scala/scala/compat/java8/converterImpl/StepsLikeSliced.scala

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
package scala.compat.java8.collectionImpl
1+
package scala.compat.java8.converterImpl
22

33
import java.util.Spliterator
4+
5+
import scala.compat.java8.collectionImpl._
46
import Stepper._
57

68
/** Abstracts all the generic operations of stepping over a collection that can be sliced into pieces.
79
* `next` must update `i` but not `i0` so that later splitting steps can keep track of whether the
810
* collection needs some sort of modification before transmission to the subclass.
911
*/
10-
abstract class AbstractStepsLikeSliced[Coll, Sub >: Null, Semi <: Sub](protected var underlying: Coll, protected var i: Int, protected var iN: Int) {
12+
private[java8] abstract class AbstractStepsLikeSliced[Coll, Sub >: Null, Semi <: Sub](protected var underlying: Coll, protected var i: Int, protected var iN: Int) {
1113
protected var i0: Int = i
1214
def semiclone(halfHint: Int): Semi // Must really do all the work for both this and cloned collection!
1315
def characteristics(): Int = Ordered
@@ -16,28 +18,28 @@ abstract class AbstractStepsLikeSliced[Coll, Sub >: Null, Semi <: Sub](protected
1618
}
1719

1820
/** Abstracts the operation of stepping over a generic collection that can be efficiently sliced or otherwise subdivided */
19-
abstract class StepsLikeSliced[A, AA, STA >: Null <: StepsLikeSliced[A, AA, _]](_underlying: AA, _i0: Int, _iN: Int)
21+
private[java8] abstract class StepsLikeSliced[A, AA, STA >: Null <: StepsLikeSliced[A, AA, _]](_underlying: AA, _i0: Int, _iN: Int)
2022
extends AbstractStepsLikeSliced[AA, AnyStepper[A], STA](_underlying, _i0, _iN)
2123
with AnyStepper[A]
2224
with EfficientSubstep
2325
{}
2426

2527
/** Abstracts the operation of stepping over a collection of Doubles that can be efficiently sliced or otherwise subdivided */
26-
abstract class StepsDoubleLikeSliced[AA, STA >: Null <: StepsDoubleLikeSliced[AA, STA]](_underlying: AA, _i0: Int, _iN: Int)
28+
private[java8] abstract class StepsDoubleLikeSliced[AA, STA >: Null <: StepsDoubleLikeSliced[AA, STA]](_underlying: AA, _i0: Int, _iN: Int)
2729
extends AbstractStepsLikeSliced[AA, DoubleStepper, STA](_underlying, _i0, _iN)
2830
with DoubleStepper
2931
with EfficientSubstep
3032
{}
3133

3234
/** Abstracts the operation of stepping over a collection of Ints that can be efficiently sliced or otherwise subdivided */
33-
abstract class StepsIntLikeSliced[AA, STA >: Null <: StepsIntLikeSliced[AA, STA]](_underlying: AA, _i0: Int, _iN: Int)
35+
private[java8] abstract class StepsIntLikeSliced[AA, STA >: Null <: StepsIntLikeSliced[AA, STA]](_underlying: AA, _i0: Int, _iN: Int)
3436
extends AbstractStepsLikeSliced[AA, IntStepper, STA](_underlying, _i0, _iN)
3537
with IntStepper
3638
with EfficientSubstep
3739
{}
3840

3941
/** Abstracts the operation of stepping over a collection of Longs that can be efficiently sliced or otherwise subdivided */
40-
abstract class StepsLongLikeSliced[AA, STA >: Null <: StepsLongLikeSliced[AA, STA]](_underlying: AA, _i0: Int, _iN: Int)
42+
private[java8] abstract class StepsLongLikeSliced[AA, STA >: Null <: StepsLongLikeSliced[AA, STA]](_underlying: AA, _i0: Int, _iN: Int)
4143
extends AbstractStepsLikeSliced[AA, LongStepper, STA](_underlying, _i0, _iN)
4244
with LongStepper
4345
with EfficientSubstep

0 commit comments

Comments
 (0)