mirror of
https://github.com/corda/corda.git
synced 2025-01-07 13:38:47 +00:00
Add Collections#synchronizedSet
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
parent
526dd574d9
commit
86c735e649
@ -245,6 +245,10 @@ public class Collections {
|
||||
}
|
||||
}
|
||||
|
||||
public static <V> Set<V> synchronizedSet(Set<V> set) {
|
||||
return new SynchronizedSet<V> (new Object(), set);
|
||||
}
|
||||
|
||||
static class SynchronizedIterator<T> implements Iterator<T> {
|
||||
private final Object lock;
|
||||
private final Iterator<T> it;
|
||||
|
Loading…
Reference in New Issue
Block a user