public class TSynchronizedByteSets extends Object
public static TByteSetwrap(TByteSet s)
It is imperative that the user manually synchronize on the returned set when iterating over it:
TByteSet s = TSynchronizedByteSets.wrap( new TByteHashSet() );
...
synchronized(s) {
TByteIterator 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.