001/*
002 * Copyright (C) 2010 The Guava Authors
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016
017package com.google.common.collect;
018
019import com.google.common.annotations.GwtCompatible;
020import java.util.Comparator;
021import java.util.SortedSet;
022import javax.annotation.Nullable;
023
024/**
025 * A sorted set multimap which forwards all its method calls to another sorted
026 * set multimap. Subclasses should override one or more methods to modify the
027 * behavior of the backing multimap as desired per the <a
028 * href="http://en.wikipedia.org/wiki/Decorator_pattern">decorator pattern</a>.
029 *
030 * @author Kurt Alfred Kluever
031 * @since 3.0
032 */
033@GwtCompatible
034public abstract class ForwardingSortedSetMultimap<K, V> extends ForwardingSetMultimap<K, V>
035    implements SortedSetMultimap<K, V> {
036
037  /** Constructor for use by subclasses. */
038  protected ForwardingSortedSetMultimap() {}
039
040  @Override
041  protected abstract SortedSetMultimap<K, V> delegate();
042
043  @Override
044  public SortedSet<V> get(@Nullable K key) {
045    return delegate().get(key);
046  }
047
048  @Override
049  public SortedSet<V> removeAll(@Nullable Object key) {
050    return delegate().removeAll(key);
051  }
052
053  @Override
054  public SortedSet<V> replaceValues(K key, Iterable<? extends V> values) {
055    return delegate().replaceValues(key, values);
056  }
057
058  @Override
059  public Comparator<? super V> valueComparator() {
060    return delegate().valueComparator();
061  }
062}