Skip to content

Commit d785149

Browse files
committed
Make SeqMap specializations private
1 parent 50e6f42 commit d785149

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

library/src/scala/collection/immutable/SeqMap.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ object SeqMap extends MapFactory[SeqMap] {
5252
}
5353

5454
@SerialVersionUID(3L)
55-
final class SeqMap1[K, +V](key1: K, value1: V) extends SeqMap[K,V] with Serializable {
55+
private final class SeqMap1[K, +V](key1: K, value1: V) extends SeqMap[K,V] with Serializable {
5656
override def size: Int = 1
5757
override def knownSize: Int = 1
5858
override def apply(key: K) = if (key == key1) value1 else throw new NoSuchElementException("key not found: " + key)
@@ -73,7 +73,7 @@ object SeqMap extends MapFactory[SeqMap] {
7373
}
7474

7575
@SerialVersionUID(3L)
76-
final class SeqMap2[K, +V](key1: K, value1: V, key2: K, value2: V) extends SeqMap[K,V] with Serializable {
76+
private final class SeqMap2[K, +V](key1: K, value1: V, key2: K, value2: V) extends SeqMap[K,V] with Serializable {
7777
override def size: Int = 2
7878
override def knownSize: Int = 2
7979
override def apply(key: K) =
@@ -104,7 +104,7 @@ object SeqMap extends MapFactory[SeqMap] {
104104
}
105105

106106
@SerialVersionUID(3L)
107-
class SeqMap3[K, +V](key1: K, value1: V, key2: K, value2: V, key3: K, value3: V) extends SeqMap[K,V] with Serializable {
107+
private class SeqMap3[K, +V](key1: K, value1: V, key2: K, value2: V, key3: K, value3: V) extends SeqMap[K,V] with Serializable {
108108
override def size: Int = 3
109109
override def knownSize: Int = 3
110110
override def apply(key: K) =
@@ -140,7 +140,7 @@ object SeqMap extends MapFactory[SeqMap] {
140140
}
141141

142142
@SerialVersionUID(3L)
143-
final class SeqMap4[K, +V](key1: K, value1: V, key2: K, value2: V, key3: K, value3: V, key4: K, value4: V) extends SeqMap[K,V] with Serializable {
143+
private final class SeqMap4[K, +V](key1: K, value1: V, key2: K, value2: V, key3: K, value3: V, key4: K, value4: V) extends SeqMap[K,V] with Serializable {
144144
override def size: Int = 4
145145
override def knownSize: Int = 4
146146
override def apply(key: K) =

0 commit comments

Comments
 (0)