MCPcopy Create free account
hub / github.com/antlr/codebuff / unmodifiableNavigableMap

Method unmodifiableNavigableMap

output/java_guava/1.4.18/Maps.java:3242–3250  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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) {

Callers 3

subMapMethod · 0.95
headMapMethod · 0.95
tailMapMethod · 0.95

Calls 1

checkNotNullMethod · 0.45

Tested by

no test coverage detected