@@ -27,6 +27,7 @@ private[collection] trait Wrappers {
27
27
override def isEmpty = underlying.isEmpty
28
28
}
29
29
30
+ @ SerialVersionUID (7914730360012802566L )
30
31
case class IteratorWrapper [A ](underlying : Iterator [A ]) extends ju.Iterator [A ] with ju.Enumeration [A ] {
31
32
def hasNext = underlying.hasNext
32
33
def next () = underlying.next()
@@ -39,34 +40,41 @@ private[collection] trait Wrappers {
39
40
def asJava = new IteratorWrapper (underlying)
40
41
}
41
42
43
+ @ SerialVersionUID (- 2624079708378729299L )
42
44
case class JIteratorWrapper [A ](underlying : ju.Iterator [A ]) extends AbstractIterator [A ] with Iterator [A ] {
43
45
def hasNext = underlying.hasNext
44
46
def next () = underlying.next
45
47
}
46
48
49
+ @ SerialVersionUID (1480199642890917878L )
47
50
case class JEnumerationWrapper [A ](underlying : ju.Enumeration [A ]) extends AbstractIterator [A ] with Iterator [A ] {
48
51
def hasNext = underlying.hasMoreElements
49
52
def next () = underlying.nextElement
50
53
}
51
54
55
+ @ SerialVersionUID (8702516763061989735L )
52
56
case class IterableWrapper [A ](underlying : Iterable [A ]) extends ju.AbstractCollection [A ] with IterableWrapperTrait [A ] { }
53
57
58
+ @ SerialVersionUID (4914368587801013118L )
54
59
case class JIterableWrapper [A ](underlying : jl.Iterable [A ]) extends AbstractIterable [A ] with Iterable [A ] {
55
60
def iterator = underlying.iterator
56
61
def newBuilder [B ] = new mutable.ArrayBuffer [B ]
57
62
}
58
63
64
+ @ SerialVersionUID (- 9156669203906593803L )
59
65
case class JCollectionWrapper [A ](underlying : ju.Collection [A ]) extends AbstractIterable [A ] with Iterable [A ] {
60
66
def iterator = underlying.iterator
61
67
override def size = underlying.size
62
68
override def isEmpty = underlying.isEmpty
63
69
def newBuilder [B ] = new mutable.ArrayBuffer [B ]
64
70
}
65
71
72
+ @ SerialVersionUID (- 2066086677605085135L )
66
73
case class SeqWrapper [A ](underlying : Seq [A ]) extends ju.AbstractList [A ] with IterableWrapperTrait [A ] {
67
74
def get (i : Int ) = underlying(i)
68
75
}
69
76
77
+ @ SerialVersionUID (- 3277343097189933650L )
70
78
case class MutableSeqWrapper [A ](underlying : mutable.Seq [A ]) extends ju.AbstractList [A ] with IterableWrapperTrait [A ] {
71
79
def get (i : Int ) = underlying(i)
72
80
override def set (i : Int , elem : A ) = {
@@ -76,13 +84,15 @@ private[collection] trait Wrappers {
76
84
}
77
85
}
78
86
87
+ @ SerialVersionUID (2065310383330290590L )
79
88
case class MutableBufferWrapper [A ](underlying : mutable.Buffer [A ]) extends ju.AbstractList [A ] with IterableWrapperTrait [A ] {
80
89
def get (i : Int ) = underlying(i)
81
90
override def set (i : Int , elem : A ) = { val p = underlying(i); underlying(i) = elem; p }
82
91
override def add (elem : A ) = { underlying append elem; true }
83
92
override def remove (i : Int ) = underlying remove i
84
93
}
85
94
95
+ @ SerialVersionUID (- 7340917072424655477L )
86
96
case class JListWrapper [A ](underlying : ju.List [A ]) extends mutable.AbstractBuffer [A ] with mutable.Buffer [A ] {
87
97
def length = underlying.size
88
98
override def isEmpty = underlying.isEmpty
@@ -132,6 +142,7 @@ private[collection] trait Wrappers {
132
142
}
133
143
}
134
144
145
+ @ SerialVersionUID (- 4801553198679985982L )
135
146
case class MutableSetWrapper [A ](underlying : mutable.Set [A ]) extends SetWrapper [A ](underlying) {
136
147
override def add (elem : A ) = {
137
148
val sz = underlying.size
@@ -144,6 +155,7 @@ private[collection] trait Wrappers {
144
155
override def clear () = underlying.clear()
145
156
}
146
157
158
+ @ SerialVersionUID (- 8813164664953372494L )
147
159
case class JSetWrapper [A ](underlying : ju.Set [A ]) extends mutable.AbstractSet [A ] with mutable.Set [A ] with mutable.SetLike [A , JSetWrapper [A ]] {
148
160
149
161
override def size = underlying.size
@@ -240,6 +252,7 @@ private[collection] trait Wrappers {
240
252
}
241
253
}
242
254
255
+ @ SerialVersionUID (8668425014051911127L )
243
256
case class MutableMapWrapper [A , B ](underlying : mutable.Map [A , B ]) extends MapWrapper [A , B ](underlying) {
244
257
override def put (k : A , v : B ) = underlying.put(k, v) match {
245
258
case Some (v1) => v1
@@ -300,10 +313,12 @@ private[collection] trait Wrappers {
300
313
* This includes `get`, as `java.util.Map`'s API does not allow for an
301
314
* atomic `get` when `null` values may be present.
302
315
*/
316
+ @ SerialVersionUID (5258955232187049103L )
303
317
case class JMapWrapper [A , B ](underlying : ju.Map [A , B ]) extends mutable.AbstractMap [A , B ] with JMapWrapperLike [A , B , JMapWrapper [A , B ]] {
304
318
override def empty = JMapWrapper (new ju.HashMap [A , B ])
305
319
}
306
320
321
+ @ SerialVersionUID (3929791676502269860L )
307
322
class ConcurrentMapWrapper [A , B ](override val underlying : concurrent.Map [A , B ]) extends MutableMapWrapper [A , B ](underlying) with juc.ConcurrentMap [A , B ] {
308
323
309
324
override def putIfAbsent (k : A , v : B ) = underlying.putIfAbsent(k, v) match {
@@ -330,6 +345,7 @@ private[collection] trait Wrappers {
330
345
* access is supported; multi-element operations such as maps and filters
331
346
* are not guaranteed to be atomic.
332
347
*/
348
+ @ SerialVersionUID (- 8245743033724996882L )
333
349
case class JConcurrentMapWrapper [A , B ](underlying : juc.ConcurrentMap [A , B ]) extends mutable.AbstractMap [A , B ] with JMapWrapperLike [A , B , JConcurrentMapWrapper [A , B ]] with concurrent.Map [A , B ] {
334
350
override def get (k : A ) = Option (underlying get k)
335
351
@@ -345,6 +361,7 @@ private[collection] trait Wrappers {
345
361
underlying.replace(k, oldvalue, newvalue)
346
362
}
347
363
364
+ @ SerialVersionUID (942915481780293390L )
348
365
case class DictionaryWrapper [A , B ](underlying : mutable.Map [A , B ]) extends ju.Dictionary [A , B ] {
349
366
def size : Int = underlying.size
350
367
def isEmpty : Boolean = underlying.isEmpty
@@ -372,6 +389,7 @@ private[collection] trait Wrappers {
372
389
}
373
390
}
374
391
392
+ @ SerialVersionUID (- 5214182838863307389L )
375
393
case class JDictionaryWrapper [A , B ](underlying : ju.Dictionary [A , B ]) extends mutable.AbstractMap [A , B ] with mutable.Map [A , B ] {
376
394
override def size : Int = underlying.size
377
395
@@ -391,6 +409,7 @@ private[collection] trait Wrappers {
391
409
override def clear () = underlying.clear()
392
410
}
393
411
412
+ @ SerialVersionUID (1265445269473530406L )
394
413
case class JPropertiesWrapper (underlying : ju.Properties ) extends mutable.AbstractMap [String , String ]
395
414
with mutable.Map [String , String ]
396
415
with mutable.MapLike [String , String , JPropertiesWrapper ] {
0 commit comments