java.util.Collections
has several unmodifiable
methods that provide unmodifiable collection views by wrapping collections in decorators that prohibit mutation operations.
Java 6 added support for java.util.NavigableSet
and java.util.NavigableMap
.
I'd like to be able to have unmodifiable NavigableSet
s and NavigableMap
s, but java.util.Collections#unmodifiableSortedSet(SortedSet)
and java.util.Collections#unmodifiableSortedMap(SortedMap)
are not sufficient because they do not support the operations that are particular to NavigableSet
and NavigableMap
.
Are there de-facto implementations for unmodifiableNavigableSet
and unmodifiableNavigableMap
?