Re: Provide support for NavigableMap/NavigableSet implementation?

2009-04-23 Thread Mark Renouf

And finally, I found this:
  http://backport-jsr166.sourceforge.net/

Public domain is about as risk-free a license as you can get I think.
I'd also like to finish my SkipList implementation, though it's not
really performing as well as it should be, I'm happy that it works...

On Apr 23, 9:26 am, Mark  Renouf  wrote:
> 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.
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Provide support for NavigableMap/NavigableSet implementation?

2009-04-23 Thread Mark Renouf

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  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 Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Provide support for NavigableMap/NavigableSet implementation?

2009-04-08 Thread Mark Renouf

Hi, I was wondering if anyone has tried adding NavigableMap/
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
implement NavigableMap. 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 the NavigableMap dictates 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 Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---