(Collection<?> c)
| 3984 | } |
| 3985 | |
| 3986 | @Override |
| 3987 | public boolean retainAll(Collection<?> c) { |
| 3988 | try { |
| 3989 | return super.retainAll(checkNotNull(c)); |
| 3990 | } catch (UnsupportedOperationException e) { |
| 3991 | // if the iterators don't support remove |
| 3992 | Set<Object> keys = Sets.newHashSetWithExpectedSize(c.size()); |
| 3993 | for (Object o : c) { |
| 3994 | if (contains(o)) { |
| 3995 | Entry<?, ?> entry = (Entry<?, ?>) o; |
| 3996 | keys.add(entry.getKey()); |
| 3997 | } |
| 3998 | } |
| 3999 | return map().keySet().retainAll(keys); |
| 4000 | } |
| 4001 | } |
| 4002 | } |
| 4003 | |
| 4004 | @GwtIncompatible // NavigableMap |
nothing calls this directly
no test coverage detected