mirror of
https://github.com/corda/corda.git
synced 2025-01-09 14:33:30 +00:00
Added no arg constructor to support Comparable types.
This commit is contained in:
parent
bba4f75c2f
commit
2d1ec11edc
@ -23,6 +23,15 @@ public class TreeSet<T> extends AbstractSet<T> implements Collection<T> {
|
|||||||
size = 0;
|
size = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public TreeSet() {
|
||||||
|
set = new PersistentSet(new Comparator<Cell<T>>() {
|
||||||
|
public int compare(Cell<T> a, Cell<T> b) {
|
||||||
|
return ((Comparable)a).compareTo(b);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
size = 0;
|
||||||
|
}
|
||||||
|
|
||||||
public Iterator<T> iterator() {
|
public Iterator<T> iterator() {
|
||||||
return new MyIterator<T>(set.first());
|
return new MyIterator<T>(set.first());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user