@@ -86,7 +86,7 @@ final class WeakHashSet[A >: Null <: AnyRef](val initialCapacity: Int, val loadF
86
86
/**
87
87
* remove a single entry from a linked list in a given bucket
88
88
*/
89
- private [this ] def remove (bucket : Int , prevEntry : Entry [A ], entry : Entry [A ]) {
89
+ private [this ] def remove (bucket : Int , prevEntry : Entry [A ], entry : Entry [A ]): Unit = {
90
90
prevEntry match {
91
91
case null => table(bucket) = entry.tail
92
92
case _ => prevEntry.tail = entry.tail
@@ -97,7 +97,7 @@ final class WeakHashSet[A >: Null <: AnyRef](val initialCapacity: Int, val loadF
97
97
/**
98
98
* remove entries associated with elements that have been gc'ed
99
99
*/
100
- private [this ] def removeStaleEntries () {
100
+ private [this ] def removeStaleEntries (): Unit = {
101
101
def poll (): Entry [A ] = queue.poll().asInstanceOf [Entry [A ]]
102
102
103
103
@ tailrec
@@ -122,7 +122,7 @@ final class WeakHashSet[A >: Null <: AnyRef](val initialCapacity: Int, val loadF
122
122
/**
123
123
* Double the size of the internal table
124
124
*/
125
- private [this ] def resize () {
125
+ private [this ] def resize (): Unit = {
126
126
val oldTable = table
127
127
table = new Array [Entry [A ]](oldTable.size * 2 )
128
128
threshhold = computeThreshHold
@@ -207,7 +207,7 @@ final class WeakHashSet[A >: Null <: AnyRef](val initialCapacity: Int, val loadF
207
207
val bucket = bucketFor(hash)
208
208
val oldHead = table(bucket)
209
209
210
- def add () {
210
+ def add () = {
211
211
table(bucket) = new Entry (elem, hash, oldHead, queue)
212
212
count += 1
213
213
if (count > threshhold) resize()
@@ -228,7 +228,7 @@ final class WeakHashSet[A >: Null <: AnyRef](val initialCapacity: Int, val loadF
228
228
def += (elem : A ) = this + elem
229
229
230
230
// from scala.reflect.interanl.Set
231
- override def addEntry (x : A ) { this += x }
231
+ override def addEntry (x : A ) = { this += x }
232
232
233
233
// remove an element from this set and return this set
234
234
override def - (elem : A ): this .type = elem match {
0 commit comments