mirror of
https://github.com/corda/corda.git
synced 2025-06-13 04:38:19 +00:00
GC stress fixes and other bugfixes; classpath progress
This commit is contained in:
@ -5,6 +5,11 @@ public class HashSet<T> implements Set<T> {
|
||||
|
||||
private final HashMap<T, Object> map;
|
||||
|
||||
public HashSet(Collection<T> c) {
|
||||
map = new HashMap(c.size());
|
||||
addAll(c);
|
||||
}
|
||||
|
||||
public HashSet(int capacity) {
|
||||
map = new HashMap(capacity);
|
||||
}
|
||||
@ -21,6 +26,10 @@ public class HashSet<T> implements Set<T> {
|
||||
return map.containsKey(element);
|
||||
}
|
||||
|
||||
public void addAll(Collection<T> c) {
|
||||
for (T t: c) add(t);
|
||||
}
|
||||
|
||||
public boolean add(T element) {
|
||||
return map.put(element, Value) != Value;
|
||||
}
|
||||
|
Reference in New Issue
Block a user