# Class: com.pnfsoftware.jeb.util.concurrent.WeakConcurrentSet

A thread\-safe set with weak values. Entries are based on a key's system hash code and keys are considered equal only by reference equality. 

 This class does not implement the [java.util.Set](java.util.Set) interface because this implementation is incompatible with the set contract. While iterating over a set's entries, any value that has not passed iteration is referenced non\-weakly.

## Constructor: WeakConcurrentSet
- parameter: `cleaner`, type: `com.pnfsoftware.jeb.util.concurrent.WeakConcurrentSet.Cleaner`

Description: Create a weak\-value concurrent set.
parameter: cleaner: cleanup strategy for stale entries

## Method: add
- parameter: `value`, type: `V`
- return type: `boolean`

Description: 
parameter: value: The value to add to the set.
return: `true` if the value was added to the set and was not contained before.

## Method: approximateSize
- return type: `int`

Description: Returns the approximate size of this set where the returned number is at least as big as the actual number of entries.
return: the approximate size of this set

## Method: clear

Description: Clears the set.

## Method: contains
- parameter: `value`, type: `V`
- return type: `boolean`

Description: 
parameter: value: The value to check if it is contained in the set.
return: `true` if the set contains the value.

## Method: expungeStaleEntries

Description: Cleans all unused references.

## Method: getCleanerThread
- return type: `java.lang.Thread`

Description: 
return: The cleaner thread or `null` if no such thread was set.

## Method: iterator
- return type: `java.util.Iterator<V>`

Description: Iterate over live values.
return: an iterator over values that have not been collected

## Method: remove
- parameter: `value`, type: `V`
- return type: `boolean`

Description: 
parameter: value: The value to remove from the set.
return: `true` if the value is contained in the set.

## Method: run

Description: Run the underlying cleaner loop until interrupted.

