1/*
2 * Copyright (C) 2010 The Guava Authors
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package com.google.common.collect;
18
19import com.google.common.annotations.GwtCompatible;
20
21import java.util.Map.Entry;
22import java.util.Set;
23
24import javax.annotation.Nullable;
25
26/**
27 * A set multimap which forwards all its method calls to another set multimap.
28 * Subclasses should override one or more methods to modify the behavior of
29 * the backing multimap as desired per the <a
30 * href="http://en.wikipedia.org/wiki/Decorator_pattern">decorator pattern</a>.
31 *
32 * @author Kurt Alfred Kluever
33 * @since 3.0
34 */
35@GwtCompatible
36public abstract class ForwardingSetMultimap<K, V>
37    extends ForwardingMultimap<K, V> implements SetMultimap<K, V> {
38
39  @Override protected abstract SetMultimap<K, V> delegate();
40
41  @Override public Set<Entry<K, V>> entries() {
42    return delegate().entries();
43  }
44
45  @Override public Set<V> get(@Nullable K key) {
46    return delegate().get(key);
47  }
48
49  @Override public Set<V> removeAll(@Nullable Object key) {
50    return delegate().removeAll(key);
51  }
52
53  @Override public Set<V> replaceValues(K key, Iterable<? extends V> values) {
54    return delegate().replaceValues(key, values);
55  }
56}
57