@@ -101,7 +101,7 @@ trait MultiDictOps[K, V, +CC[X, Y] <: MultiDict[X, Y], +C <: MultiDict[K, V]]
101101 * @tparam W new type of values
102102 */
103103 def map [L , W ](f : ((K , V )) => (L , W )): CC [L , W ] =
104- multiMapFromIterable(View .Map (toIterable, f))
104+ multiMapFromIterable(new View .Map (toIterable, f))
105105
106106 /**
107107 * @return a multidict that contains all the entries of `this` multidict,
@@ -112,7 +112,7 @@ trait MultiDictOps[K, V, +CC[X, Y] <: MultiDict[X, Y], +C <: MultiDict[K, V]]
112112 * @tparam W new type of values
113113 */
114114 def flatMap [L , W ](f : ((K , V )) => IterableOnce [(L , W )]): CC [L , W ] =
115- multiMapFromIterable(View .FlatMap (toIterable, f))
115+ multiMapFromIterable(new View .FlatMap (toIterable, f))
116116
117117 /**
118118 * @return a multidict that contains all the entries of `this` multidict
@@ -125,19 +125,19 @@ trait MultiDictOps[K, V, +CC[X, Y] <: MultiDict[X, Y], +C <: MultiDict[K, V]]
125125 */
126126 def collect [L , W ](pf : PartialFunction [(K , V ), (L , W )]): CC [L , W ] =
127127 flatMap(kv =>
128- if (pf.isDefinedAt(kv)) View .Single (pf(kv))
128+ if (pf.isDefinedAt(kv)) new View .Single (pf(kv))
129129 else View .Empty
130130 )
131131
132132 /** Concatenate the entries given in `that` iterable to `this` multidict */
133133 def concat (that : Iterable [(K , V )]): C =
134- fromSpecificIterable(View .Concat (toIterable, that))
134+ fromSpecificIterable(new View .Concat (toIterable, that))
135135
136136 override def withFilter (p : ((K , V )) => Boolean ): MultiMapWithFilter = new MultiMapWithFilter (p)
137137
138138 class MultiMapWithFilter (p : ((K , V )) => Boolean ) extends WithFilter (p) {
139- def map [L , W ](f : ((K , V )) => (L , W )): CC [L , W ] = multiMapFromIterable(View .Map (filtered, f))
140- def flatMap [L , W ](f : ((K , V )) => IterableOnce [(L , W )]): CC [L , W ] = multiMapFromIterable(View .FlatMap (filtered, f))
139+ def map [L , W ](f : ((K , V )) => (L , W )): CC [L , W ] = multiMapFromIterable(new View .Map (filtered, f))
140+ def flatMap [L , W ](f : ((K , V )) => IterableOnce [(L , W )]): CC [L , W ] = multiMapFromIterable(new View .FlatMap (filtered, f))
141141 override def withFilter (q : ((K , V )) => Boolean ): MultiMapWithFilter = new MultiMapWithFilter (kv => p(kv) && q(kv))
142142 }
143143
@@ -157,7 +157,7 @@ trait MultiDictOps[K, V, +CC[X, Y] <: MultiDict[X, Y], +C <: MultiDict[K, V]]
157157 * @tparam W the type of values of the returned multidict
158158 */
159159 def mapSets [L , W ](f : ((K , Set [V ])) => (L , Set [W ])): CC [L , W ] =
160- fromSets(View .Map (sets, f))
160+ fromSets(new View .Map (sets, f))
161161
162162 /**
163163 * @return a multidict that contains all the entries of `this` multidict,
@@ -170,7 +170,7 @@ trait MultiDictOps[K, V, +CC[X, Y] <: MultiDict[X, Y], +C <: MultiDict[K, V]]
170170 */
171171 def collectSets [L , W ](pf : PartialFunction [(K , Set [V ]), (L , Set [W ])]): CC [L , W ] =
172172 flatMapSets(kvs =>
173- if (pf.isDefinedAt(kvs)) View .Single (pf(kvs))
173+ if (pf.isDefinedAt(kvs)) new View .Single (pf(kvs))
174174 else View .Empty
175175 )
176176
@@ -183,7 +183,7 @@ trait MultiDictOps[K, V, +CC[X, Y] <: MultiDict[X, Y], +C <: MultiDict[K, V]]
183183 * @tparam W the type of values of the returned multidict
184184 */
185185 def flatMapSets [L , W ](f : ((K , Set [V ])) => IterableOnce [(L , Set [W ])]): CC [L , W ] =
186- fromSets(View .FlatMap (sets, f))
186+ fromSets(new View .FlatMap (sets, f))
187187
188188 /**
189189 * @return a new multidict concatenating the values of this multidict
@@ -192,14 +192,14 @@ trait MultiDictOps[K, V, +CC[X, Y] <: MultiDict[X, Y], +C <: MultiDict[K, V]]
192192 * @param that the collection of values to add to this multidict
193193 */
194194 def concatSets (that : Iterable [(K , Set [V ])]): C =
195- fromSpecificSets(View .Concat (sets, that))
195+ fromSpecificSets(new View .Concat (sets, that))
196196
197197 /**
198198 * @return a multidict that contains all the entries of this multidict
199199 * that satisfy the predicate `p`
200200 */
201201 def filterSets (p : ((K , Set [V ])) => Boolean ): C =
202- fromSpecificSets(View .Filter (sets, p, isFlipped = false ))
202+ fromSpecificSets(new View .Filter (sets, p, isFlipped = false ))
203203
204204}
205205
0 commit comments