Coverage Summary for Class: FilteredEntrySetMultimap (com.google.common.collect)
| Class | Class, % | Method, % | Line, % |
|---|---|---|---|
| FilteredEntrySetMultimap | 0% (0/1) | 0% (0/7) | 0% (0/7) |
1 /* 2 * Copyright (C) 2012 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.common.base.Predicate; 21 import java.util.Map.Entry; 22 import java.util.Set; 23 24 /** 25 * Implementation of {@link Multimaps#filterEntries(SetMultimap, Predicate)}. 26 * 27 * @author Louis Wasserman 28 */ 29 @GwtCompatible 30 final class FilteredEntrySetMultimap<K, V> extends FilteredEntryMultimap<K, V> 31 implements FilteredSetMultimap<K, V> { 32 33 FilteredEntrySetMultimap(SetMultimap<K, V> unfiltered, Predicate<? super Entry<K, V>> predicate) { 34 super(unfiltered, predicate); 35 } 36 37 @Override 38 public SetMultimap<K, V> unfiltered() { 39 return (SetMultimap<K, V>) unfiltered; 40 } 41 42 @Override 43 public Set<V> get(K key) { 44 return (Set<V>) super.get(key); 45 } 46 47 @Override 48 public Set<V> removeAll(Object key) { 49 return (Set<V>) super.removeAll(key); 50 } 51 52 @Override 53 public Set<V> replaceValues(K key, Iterable<? extends V> values) { 54 return (Set<V>) super.replaceValues(key, values); 55 } 56 57 @Override 58 Set<Entry<K, V>> createEntries() { 59 return Sets.filter(unfiltered().entries(), entryPredicate()); 60 } 61 62 @Override 63 public Set<Entry<K, V>> entries() { 64 return (Set<Entry<K, V>>) super.entries(); 65 } 66 }