In case anyone was curious I finally noticed that Apache Harmony now
has implementations of this. Being Apache licensed, I believe I'm
completely in the clear to take and modify the Harmony version to make
it play well in GWT.

There's seems to be some strange behavior in not being able to
override both TreeMap and AbstractMap... when GWT compiles TreeMap, it
does not use my version of AbstractMap so it some things expected to
be inherited in the new TreeMap are not there. Folding in the
inherited code gets around this.

I also had to remove clone() and readObject/writeObject serialization,
and then it basically works. Performance seems acceptable, though I
haven't done exhaustive testing, just some basic benchmarks.

It would be really nice if this was part of GWT, the business of super-
source JRE overriding is messy, and I'd rather not have it part of my
project. There's not a lot else from 1.6 that makes sense for GWT
(concurrency, etc), but in my opinion NavigableMap is all the stuff
that SortedMap forgot, and they finally got around to adding.

On Apr 8, 12:01 pm, Mark  Renouf <[email protected]> wrote:
> Hi, I was wondering if anyone has tried addingNavigableMap/
> NavigableSet (From JDK 1.6), support for use in GWT?
>
> Using the JRE emulation mechanism (super-source), it should be
> possible to add the required interfaces then update GWT's TreeMap, to
> implementNavigableMap. I've gotten part-way through this with a
> SkipList but implementing all of the extra methods to return sub-views
> is too much work. I realized it might be simpler to just extend
> Google's version of TreeMap to add the Navigable code.
>
> Any thoughts? I searched a bit, but nothing yet.
>
> My main use case is finding a point in a sorted set, then efficiently
> iterating in either direction. I've cooked up my own SkipListMap
> implementation but I feel like I'm reinventing the wheel if I create
> my own navigable interface, but theNavigableMapdictates a lot of
> functionality I don't have time to implement myself either.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to