From 2d1ec11edcfce6a965266f22c2a13adb937ae494 Mon Sep 17 00:00:00 2001 From: Matt Weaver Date: Mon, 14 Jul 2008 08:45:51 -0600 Subject: [PATCH] Added no arg constructor to support Comparable types. --- classpath/java/util/TreeSet.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/classpath/java/util/TreeSet.java b/classpath/java/util/TreeSet.java index e4e70a9507..a2eddfe22a 100644 --- a/classpath/java/util/TreeSet.java +++ b/classpath/java/util/TreeSet.java @@ -23,6 +23,15 @@ public class TreeSet extends AbstractSet implements Collection { size = 0; } + public TreeSet() { + set = new PersistentSet(new Comparator>() { + public int compare(Cell a, Cell b) { + return ((Comparable)a).compareTo(b); + } + }); + size = 0; + } + public Iterator iterator() { return new MyIterator(set.first()); }