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

Method getOrDefault

corpus/java/training/guava/cache/LocalCache.java:4045–4049  ·  view source on GitHub ↗
(@Nullable Object key, @Nullable V defaultValue)

Source from the content-addressed store, hash-verified

4043 // Only becomes available in Java 8 when it's on the interface.
4044 // @Override
4045 @Nullable
4046 public V getOrDefault(@Nullable Object key, @Nullable V defaultValue) {
4047 V result = get(key);
4048 return (result != null) ? result : defaultValue;
4049 }
4050
4051 V get(K key, CacheLoader<? super K, V> loader) throws ExecutionException {
4052 int hash = hash(checkNotNull(key));

Callers

nothing calls this directly

Calls 1

getMethod · 0.95

Tested by

no test coverage detected