dcsimg
!_NEWLINE_!How can I implement a List (ordered collection) that...
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Tim_Rohaly
Posted On:   Friday, February 4, 2000 01:07 PM


How can I implement a List (ordered collection) that keeps an
index (i.e. a Map ) of its contents?



I can't implement both the Map and List interfaces
because Map defines a remove(Object o) method that
returns an Object
and List inherits a remove(Object o) method that returns a
boolean . The compiler doesn't like this because overloaded
methods can't differ by only return type.

About | Sitemap | Contact