I downloaded the current alpha release to look over how the replacement of Vector had come along and was happy to see that it has been largely replaced with HsqlArrayList.  I did notice that the HsqlList and HsqlLinkedList classes haven't been used yet.  Here are two examples from the current code of where I was envisioning these being used.  
 
The interface HsqlList was written so that different implementations of the list data structure could be used interchangeably.  That way if a new list interface is written or a different implementation is choosen, the transition is easier.  Also, it provides greater flexability with utility methods.  For example in Database.class you might have 
 
HsqlList tTables = new HsqlArrayList();
 
HsqlList getTables()
 
and it also allows something like:        
 
public void sortMyList(HsqlList list)       
 
to work without casting.
 
Using HsqlLinkedList instead of Vector isn't as seamless a transition since Enumeration are used instead of indexes, but they are more efficient than an array based list when the operations are simply populating, iterating, removing (especially), and clearing. 
 
Two examples that I saw (at a glance) where a linked list might be more efficient is tTransaction in Session and vConstraints in Table.
 
 
David Nordahl (dnordahl)
 
 
 

Reply via email to