diff options
Diffstat (limited to 'src/library')
-rw-r--r-- | src/library/scala/collection/immutable/Set.scala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/library/scala/collection/immutable/Set.scala b/src/library/scala/collection/immutable/Set.scala index d5520163d4..a6019217cb 100644 --- a/src/library/scala/collection/immutable/Set.scala +++ b/src/library/scala/collection/immutable/Set.scala @@ -65,7 +65,7 @@ object Set extends ImmutableSetFactory[Set] { /** An optimized representation for immutable sets of size 1 */ @SerialVersionUID(1233385750652442003L) - class Set1[A](elem1: A) extends Set[A] with Serializable { + class Set1[A] private[collection] (elem1: A) extends Set[A] with Serializable { override def size: Int = 1 def contains(elem: A): Boolean = elem == elem1 @@ -84,7 +84,7 @@ object Set extends ImmutableSetFactory[Set] { /** An optimized representation for immutable sets of size 2 */ @SerialVersionUID(-6443011234944830092L) - class Set2[A](elem1: A, elem2: A) extends Set[A] with Serializable { + class Set2[A] private[collection] (elem1: A, elem2: A) extends Set[A] with Serializable { override def size: Int = 2 def contains(elem: A): Boolean = elem == elem1 || elem == elem2 @@ -104,7 +104,7 @@ object Set extends ImmutableSetFactory[Set] { /** An optimized representation for immutable sets of size 3 */ @SerialVersionUID(-3590273538119220064L) - class Set3[A](elem1: A, elem2: A, elem3: A) extends Set[A] with Serializable { + class Set3[A] private[collection] (elem1: A, elem2: A, elem3: A) extends Set[A] with Serializable { override def size: Int = 3 def contains(elem: A): Boolean = elem == elem1 || elem == elem2 || elem == elem3 @@ -125,7 +125,7 @@ object Set extends ImmutableSetFactory[Set] { /** An optimized representation for immutable sets of size 4 */ @SerialVersionUID(-3622399588156184395L) - class Set4[A](elem1: A, elem2: A, elem3: A, elem4: A) extends Set[A] with Serializable { + class Set4[A] private[collection] (elem1: A, elem2: A, elem3: A, elem4: A) extends Set[A] with Serializable { override def size: Int = 4 def contains(elem: A): Boolean = elem == elem1 || elem == elem2 || elem == elem3 || elem == elem4 |