public class TSynchronizedFloatSets extends Object
public static TFloatSetwrap(TFloatSet s)
It is imperative that the user manually synchronize on the returned set when iterating over it:
TFloatSet s = TSynchronizedFloatSets.wrap( new TFloatHashSet() );
...
synchronized(s) {
TFloatIterator i = s.iterator(); // Must be in the synchronized block
while ( i.hasNext() )
foo( i.next() );
}
Failure to follow this advice may result in non-deterministic behavior.
The returned set will be serializable if the specified set is serializable.
s - the set to be "wrapped" in a synchronized set.