Coverage Summary for Class: ForwardingListMultimap (com.google.common.collect)
| Class | Class, % | Method, % | Line, % |
|---|---|---|---|
| ForwardingListMultimap | 0% (0/1) | 0% (0/4) | 0% (0/4) |
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 17 package com.google.common.collect; 18 19 import com.google.common.annotations.GwtCompatible; 20 import com.google.errorprone.annotations.CanIgnoreReturnValue; 21 import java.util.List; 22 import org.checkerframework.checker.nullness.qual.Nullable; 23 24 /** 25 * A list multimap which forwards all its method calls to another list multimap. Subclasses should 26 * override one or more methods to modify the behavior of the backing multimap as desired per the <a 27 * href="http://en.wikipedia.org/wiki/Decorator_pattern">decorator pattern</a>. 28 * 29 * <p><b>{@code default} method warning:</b> This class does <i>not</i> forward calls to {@code 30 * default} methods. Instead, it inherits their default implementations. When those implementations 31 * invoke methods, they invoke methods on the {@code ForwardingListMultimap}. 32 * 33 * @author Kurt Alfred Kluever 34 * @since 3.0 35 */ 36 @GwtCompatible 37 public abstract class ForwardingListMultimap<K, V> extends ForwardingMultimap<K, V> 38 implements ListMultimap<K, V> { 39 40 /** Constructor for use by subclasses. */ 41 protected ForwardingListMultimap() {} 42 43 @Override 44 protected abstract ListMultimap<K, V> delegate(); 45 46 @Override 47 public List<V> get(@Nullable K key) { 48 return delegate().get(key); 49 } 50 51 @CanIgnoreReturnValue 52 @Override 53 public List<V> removeAll(@Nullable Object key) { 54 return delegate().removeAll(key); 55 } 56 57 @CanIgnoreReturnValue 58 @Override 59 public List<V> replaceValues(K key, Iterable<? extends V> values) { 60 return delegate().replaceValues(key, values); 61 } 62 }