1090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson/* 21d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert * Copyright (C) 2010 The Guava Authors 3090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson * 4090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson * Licensed under the Apache License, Version 2.0 (the "License"); 5090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson * you may not use this file except in compliance with the License. 6090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson * You may obtain a copy of the License at 7090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson * 8090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson * http://www.apache.org/licenses/LICENSE-2.0 9090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson * 10090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson * Unless required by applicable law or agreed to in writing, software 11090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson * distributed under the License is distributed on an "AS IS" BASIS, 12090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson * See the License for the specific language governing permissions and 14090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson * limitations under the License. 15090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson */ 16090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson 17090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilsonpackage com.google.common.collect; 18090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson 19090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilsonimport com.google.common.annotations.GwtCompatible; 20090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson 211d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringertimport java.util.Map.Entry; 221d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringertimport java.util.Set; 23090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson 24090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilsonimport javax.annotation.Nullable; 25090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson 26090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson/** 271d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert * A set multimap which forwards all its method calls to another set multimap. 281d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert * Subclasses should override one or more methods to modify the behavior of 291d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert * the backing multimap as desired per the <a 30090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson * href="http://en.wikipedia.org/wiki/Decorator_pattern">decorator pattern</a>. 31090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson * 321d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert * @author Kurt Alfred Kluever 331d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert * @since 3.0 34090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson */ 35090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson@GwtCompatible 361d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringertpublic abstract class ForwardingSetMultimap<K, V> 371d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert extends ForwardingMultimap<K, V> implements SetMultimap<K, V> { 38090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson 391d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert @Override protected abstract SetMultimap<K, V> delegate(); 40090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson 411d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert @Override public Set<Entry<K, V>> entries() { 421d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert return delegate().entries(); 43090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson } 44090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson 451d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert @Override public Set<V> get(@Nullable K key) { 461d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert return delegate().get(key); 47090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson } 48090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson 491d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert @Override public Set<V> removeAll(@Nullable Object key) { 501d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert return delegate().removeAll(key); 51090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson } 52090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson 531d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert @Override public Set<V> replaceValues(K key, Iterable<? extends V> values) { 541d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert return delegate().replaceValues(key, values); 55090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson } 56090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson} 57