Name: tb29552 Date: 11/06/98 I have a need for a collection that maintains an ordered list (like ArrayList) but allows fast access by a key (like HashMap). My particular use for this is withing a TableModel that represents database rows that may be changed by other objects. I would like to implement both the List and Map interfaces. It appears that the one and only barrier to this is that both interfaces contain a remove(Object) method, but they return different things. List returns boolean, while Map returns Object. You can't create a set of methods that will compile for the following class declaration: import java.util.*; public class HashList implements List, Map { } I know it's late in the release cycle to do this, but if it's not done now -- when? I'd like List to return the object removed, with null for a failure to find it. (Review ID: 42265) ======================================================================
|