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

Method unmodifiableNavigableMap

output/java_guava/1.4.19/Maps.java:3244–3252  ·  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

3242 */
3243
3244 @GwtIncompatible // NavigableMap
3245 public static <K, V> NavigableMap<K, V> unmodifiableNavigableMap(NavigableMap<K, V> map) {
3246 checkNotNull(map);
3247 if (map instanceof UnmodifiableNavigableMap) {
3248 return map;
3249 } else {
3250 return new UnmodifiableNavigableMap<K, V>(map);
3251 }
3252 }
3253
3254 @Nullable
3255 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