Hello all,

I'm not sure if it is important, but my Visual Age for java complains that
Iterator is not visible in FastTreeMap.java because 
there also exists a private Iterator inner class in the base class TreeMap,
 so the compiler gets confused.

Yes , you can blame it on the compiler but
I know there are a lot of people that use VAJava, therefore I think that
maybe it's
worth making this little modification so we don't have to make it
by hand every time we import the jakarta-collections in VAJava.

Speeking of FastTreeMap.java, I am confused why it needs to inherit from
TreeMap.
The SortedMap functionality is completely implemented by delegation so
inheriting
from TreeMap looks rather unnecessary.

The same situation with FastArrayList, FastHashMap. It's not that big of a
deal but if tommorrow 
Sun issue a JDK 1.4 and adds something to Map for example, and of course
implemented in HashMap,
then FastHashMap will still compile beautifully but will produce incorrect
results at run-time.

My idea is that maybe it's useful to declare only FastTreeMap implements
Sortedmap
and the equivalent for other types.

Costin

cvs diff FastTreeMap.java (in directory
C:\costin\open-source\jakarta\jakarta-commons\collections\src\java\org\apach
e\commons\collections\)
Index: FastTreeMap.java
===================================================================
RCS file:
/home/cvspublic/jakarta-commons/collections/src/java/org/apache/commons/coll
ections/FastTreeMap.java,v
retrieving revision 1.3
diff -r1.3 FastTreeMap.java
323c323
<             Iterator i = map.entrySet().iterator();
---
>             java.util.Iterator i = map.entrySet().iterator();
341c341
<                 Iterator i = map.entrySet().iterator();
---
>                 java.util.Iterator i = map.entrySet().iterator();
407c407
<             Iterator i = map.entrySet().iterator();
---
>             java.util.Iterator i = map.entrySet().iterator();
414c414
<                 Iterator i = map.entrySet().iterator();
---
>                 java.util.Iterator i = map.entrySet().iterator();

Reply via email to