mirror of
https://github.com/corda/corda.git
synced 2025-01-22 12:28:11 +00:00
Added constructor for java.util.HashMap
This commit is contained in:
parent
c810eb36d8
commit
73e7bfc1dc
@ -32,6 +32,13 @@ public class HashMap<K, V> implements Map<K, V> {
|
||||
this(0);
|
||||
}
|
||||
|
||||
public HashMap(Map<K, V> map) {
|
||||
this(map.size());
|
||||
for (Map.Entry<K, V> entry : map.entrySet()) {
|
||||
put(entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("{");
|
||||
|
Loading…
Reference in New Issue
Block a user