(Collection<?> c)
| 3918 | } |
| 3919 | |
| 3920 | @Override |
| 3921 | public boolean retainAll(Collection<?> c) { |
| 3922 | try { |
| 3923 | return super.retainAll(checkNotNull(c)); |
| 3924 | } catch (UnsupportedOperationException e) { |
| 3925 | // if the iterators don't support remove |
| 3926 | Set<Object> keys = Sets.newHashSetWithExpectedSize(c.size()); |
| 3927 | for (Object o : c) { |
| 3928 | if (contains(o)) { |
| 3929 | Entry<?, ?> entry = (Entry<?, ?>) o; |
| 3930 | keys.add(entry.getKey()); |
| 3931 | } |
| 3932 | } |
| 3933 | return map().keySet().retainAll(keys); |
| 3934 | } |
| 3935 | } |
| 3936 | } |
| 3937 | |
| 3938 | @GwtIncompatible // NavigableMap |
nothing calls this directly
no test coverage detected