@@ -28,7 +28,7 @@ private[collection] trait Wrappers {
28
28
def next () = underlying.next()
29
29
def hasMoreElements = underlying.hasNext
30
30
def nextElement () = underlying.next()
31
- def remove () = throw new UnsupportedOperationException
31
+ override def remove () = throw new UnsupportedOperationException
32
32
}
33
33
34
34
class ToIteratorWrapper [A ](underlying : Iterator [A ]) {
@@ -113,7 +113,7 @@ private[collection] trait Wrappers {
113
113
var prev : Option [A ] = None
114
114
def hasNext = ui.hasNext
115
115
def next = { val e = ui.next(); prev = Some (e); e }
116
- def remove = prev match {
116
+ override def remove () = prev match {
117
117
case Some (e) =>
118
118
underlying match {
119
119
case ms : mutable.Set [a] =>
@@ -200,7 +200,7 @@ private[collection] trait Wrappers {
200
200
}
201
201
}
202
202
203
- def remove () {
203
+ override def remove () {
204
204
prev match {
205
205
case Some (k) =>
206
206
underlying match {
@@ -293,24 +293,24 @@ private[collection] trait Wrappers {
293
293
294
294
class ConcurrentMapWrapper [A , B ](override val underlying : concurrent.Map [A , B ]) extends MutableMapWrapper [A , B ](underlying) with juc.ConcurrentMap [A , B ] {
295
295
296
- def putIfAbsent (k : A , v : B ) = underlying.putIfAbsent(k, v) match {
296
+ override def putIfAbsent (k : A , v : B ) = underlying.putIfAbsent(k, v) match {
297
297
case Some (v) => v
298
298
case None => null .asInstanceOf [B ]
299
299
}
300
300
301
- def remove (k : AnyRef , v : AnyRef ) = try {
301
+ override def remove (k : AnyRef , v : AnyRef ) = try {
302
302
underlying.remove(k.asInstanceOf [A ], v.asInstanceOf [B ])
303
303
} catch {
304
304
case ex : ClassCastException =>
305
305
false
306
306
}
307
307
308
- def replace (k : A , v : B ): B = underlying.replace(k, v) match {
308
+ override def replace (k : A , v : B ): B = underlying.replace(k, v) match {
309
309
case Some (v) => v
310
310
case None => null .asInstanceOf [B ]
311
311
}
312
312
313
- def replace (k : A , oldval : B , newval : B ) = underlying.replace(k, oldval, newval)
313
+ override def replace (k : A , oldval : B , newval : B ) = underlying.replace(k, oldval, newval)
314
314
}
315
315
316
316
/** Wraps a concurrent Java map as a Scala one. Single-element concurrent
0 commit comments