(Object object)
| 1035 | // GWT compiler warning; see contains(). |
| 1036 | |
| 1037 | @SuppressWarnings("cast") |
| 1038 | @Override |
| 1039 | public boolean remove(Object object) { |
| 1040 | if (object instanceof Multiset.Entry) { |
| 1041 | Entry<?> entry = (Entry<?>) object; |
| 1042 | Object element = entry.getElement(); |
| 1043 | int entryCount = entry.getCount(); |
| 1044 | if (entryCount != 0) { |
| 1045 | // Safe as long as we never add a new entry, which we won't. |
| 1046 | @SuppressWarnings("unchecked") |
| 1047 | Multiset<Object> multiset = (Multiset) multiset(); |
| 1048 | return multiset.setCount(element, entryCount, 0); |
| 1049 | } |
| 1050 | } |
| 1051 | return false; |
| 1052 | } |
| 1053 | |
| 1054 | @Override |
| 1055 | public void clear() { |
nothing calls this directly
no test coverage detected