[concurrency-interest] Unmodifiable Navigable{Set,Map} ?

Hanson Char hanson.char at gmail.com
Wed Mar 17 20:48:28 EDT 2010


Actually TreeSet and TreeMap are the non-concurrent navigable Set/Map in the
jdk.  Would be nice if there is a
Collections.unmodifiableNavigable{Set,Map}(...).

Or in the google-collections case, would be nice if there is an
ImmutableNavigable{Set,Map}.

Hanson

On Wed, Mar 17, 2010 at 9:55 AM, Kevin Bourrillion <kevinb at google.com>wrote:

> If you can make do with the older Sorted{Set,Map} interfaces, there are
> array-based immutable implementations in google-collections 1.0.
>
>
> http://google-collections.googlecode.com/svn/trunk/javadoc/com/google/common/collect/ImmutableSortedSet.html
>
> http://google-collections.googlecode.com/svn/trunk/javadoc/com/google/common/collect/ImmutableSortedMap.html
>
>
>
> On Wed, Mar 17, 2010 at 9:34 AM, Hanson Char <hanson.char at gmail.com>wrote:
>
>> Does it make sense to have a "non-concurrent" skip list set/map
>> implementation and provide a Collections.unmodifiableNaviable{Set,Map}(...)
>> method so clients can choose to operate on an immutable Navigable{Set,Map},
>> which is (by definition) both thread-safe and presumably can be a more light
>> weight implementation than the existing ConcurrentSkipList{Set,Map} ?  Is
>> the current lack of such API's an accident or by intent ?
>>
>> Thanks,
>> Hanson
>>
>> _______________________________________________
>> Concurrency-interest mailing list
>> Concurrency-interest at cs.oswego.edu
>> http://cs.oswego.edu/mailman/listinfo/concurrency-interest
>>
>>
>
>
> --
> Kevin Bourrillion @ Google
> internal:  http://goto/javalibraries
> external: http://guava-libraries.googlecode.com
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20100317/f7cc10dd/attachment.html>


More information about the Concurrency-interest mailing list