diff options
Diffstat (limited to 'guava/src/com/google/common/cache/ForwardingCache.java')
-rw-r--r-- | guava/src/com/google/common/cache/ForwardingCache.java | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/guava/src/com/google/common/cache/ForwardingCache.java b/guava/src/com/google/common/cache/ForwardingCache.java index 44fe683..4404593 100644 --- a/guava/src/com/google/common/cache/ForwardingCache.java +++ b/guava/src/com/google/common/cache/ForwardingCache.java @@ -21,7 +21,6 @@ import com.google.common.base.Preconditions; import com.google.common.collect.ForwardingObject; import com.google.common.collect.ImmutableMap; -import java.util.Map; import java.util.concurrent.Callable; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.ExecutionException; @@ -50,7 +49,7 @@ public abstract class ForwardingCache<K, V> extends ForwardingObject implements */ @Override @Nullable - public V getIfPresent(Object key) { + public V getIfPresent(K key) { return delegate().getIfPresent(key); } @@ -66,7 +65,7 @@ public abstract class ForwardingCache<K, V> extends ForwardingObject implements * @since 11.0 */ @Override - public ImmutableMap<K, V> getAllPresent(Iterable<?> keys) { + public ImmutableMap<K, V> getAllPresent(Iterable<? extends K> keys) { return delegate().getAllPresent(keys); } @@ -78,14 +77,6 @@ public abstract class ForwardingCache<K, V> extends ForwardingObject implements delegate().put(key, value); } - /** - * @since 12.0 - */ - @Override - public void putAll(Map<? extends K,? extends V> m) { - delegate().putAll(m); - } - @Override public void invalidate(Object key) { delegate().invalidate(key); @@ -124,6 +115,24 @@ public abstract class ForwardingCache<K, V> extends ForwardingObject implements delegate().cleanUp(); } + @Deprecated + @Override + public V get(K key) throws ExecutionException { + return delegate().get(key); + } + + @Deprecated + @Override + public V getUnchecked(K key) { + return delegate().getUnchecked(key); + } + + @Deprecated + @Override + public V apply(K key) { + return delegate().apply(key); + } + /** * A simplified version of {@link ForwardingCache} where subclasses can pass in an already * constructed {@link Cache} as the delegete. |