Welcome! Please see the About page for a little more info on how this works.

0 votes
in Clojure by

Currently we can have a subseq of a sorted-set|map-by, but this returns a seq and
not a Set or Map.
Implementing the interfaces java.util.SortedSet and java.util.SortedMap would give
us support for calling .subSet and .subMap.

9 Answers

0 votes
by

Comment made by: importer

Converted from http://www.assembla.com/spaces/clojure/tickets/248

0 votes
by

Comment made by: importer

awizzard said: Another nice addition could be (link: http://java.sun.com/javase/6/docs/api/java/util/NavigableMap.html text: java.util.NavigableMap), though this is available only since Java 6.

0 votes
by

Comment made by: jim.blomo

SortedSet-SortedMap-interfaces-248.diff 2012-05-10 is a first pass at the SortedMap interface. If there are no objections, I'll build on the SortedMap implementation to add SortedSet support.

0 votes
by

Comment made by: jim.blomo

SortedMap-interfaces-248.diff 2012-05-10 supersedes the last diff. It implements and tests the SortedMap interface.

Additionally it includes tests for sorted-map, which didn't seem to be tested yet.

0 votes
by

Comment made by: jim.blomo

SortedMap-SortedSet-interfaces-248.diff 2012-05-18 supersedes the last diff. It implements and tests both SortedMap and SortedSet.

(Concurrent)NavigableMap is not implemented because I think 1.5 is still targeted. In any case, it probably should have its own ticket.

0 votes
by

Comment made by: jafingerhut

clj-248-SortedMap-SortedSet-interfaces-patch2.txt dated May 24, 2012 is simply an updated version of SortedMap-SortedSet-interfaces-248.diff dated May 17, 2012. The latter patch no longer applied cleanly.

The new patch combines what was internally multiple git commits into one, simply because it was easier for me to create the patch that way. I left out the addition of .swp and .swo files to the .gitignore file. Builds and tests cleanly on Oracle/Apple JDK 1.6 on Mac OS X 10.6.8.

0 votes
by

Comment made by: jafingerhut

I don't know why Priority changed to Blocker when I changed Patch to "Code and Test". I didn't try to do that -- suspect that something with the web UI is doing that automatically somehow.

0 votes
by

Comment made by: jim.blomo

Added CLJ-1008 for NavigableMap interface enhancement.

0 votes
by
Reference: https://clojure.atlassian.net/browse/CLJ-248 (reported by alex+import)
...