When did we do a remove?
johan
----- Original Message -----
From: "Henner Zeller" <HZ...@me...>
To: "SQuirreL list" <squ...@li...>
Sent: Monday, February 18, 2002 10:58 AM
Subject: [Squirrel-sql-develop] Update Feature Patch: hierachical table
display ..
>
> Hi,
> In the former patch to this topic I replaced the ArrayList to store the
> table infos with a HashSet - this was because its O(n) to remove from an
> ArrayList but only O(1) from an HashSet. Unfortunatly, this destroys the
> order of the tables, sine the hash function has no order ..
>
> .. so now I implemented this with a TreeSet that orders the tables
> alphabetically (for this, I made the IDatabaseObjectInfo extend Comparable
> and compare the qualified names in DatabaseObjectInfo). This has the nice
> side-effect, that table names are always sorted, even if JDBC-drivers
> fail so return them sorted.
>
> See attached patch. This is a patch agains current CVS.
>
> ciao,
> -hen
>
|