Returns an unmodifiable view of the specified navigable map. Query operations on the returned map read through to the specified map, and attempts to modify the returned map, whether direct or via its views, result in an UnsupportedOperationException. The returned navigable map will be se
(NavigableMap<K, V> map)
| 3240 | */ |
| 3241 | |
| 3242 | @GwtIncompatible // NavigableMap |
| 3243 | public static <K, V> NavigableMap<K, V> unmodifiableNavigableMap(NavigableMap<K, V> map) { |
| 3244 | checkNotNull(map); |
| 3245 | if (map instanceof UnmodifiableNavigableMap) { |
| 3246 | return map; |
| 3247 | } else { |
| 3248 | return new UnmodifiableNavigableMap<K, V>(map); |
| 3249 | } |
| 3250 | } |
| 3251 | |
| 3252 | @Nullable |
| 3253 | private static <K, V> Entry<K, V> unmodifiableOrNull(@Nullable Entry<K, V> entry) { |
no test coverage detected