mirror of
https://github.com/corda/corda.git
synced 2025-06-13 04:38:19 +00:00
add TreeSet(Collection) constructor
This commit is contained in:
@ -33,6 +33,14 @@ public class TreeSet<T> extends AbstractSet<T> implements Collection<T> {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public TreeSet(Collection<? extends T> collection) {
|
||||
this();
|
||||
|
||||
for (T item: collection) {
|
||||
add(item);
|
||||
}
|
||||
}
|
||||
|
||||
public Iterator<T> iterator() {
|
||||
return new MyIterator<T>(set.first());
|
||||
|
Reference in New Issue
Block a user