MCPcopy Create free account
hub / github.com/antlr/codebuff / remove

Method remove

output/java_guava/1.4.17/Multisets.java:1037–1052  ·  view source on GitHub ↗
(Object object)

Source from the content-addressed store, hash-verified

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() {

Callers

nothing calls this directly

Calls 4

multisetMethod · 0.95
getElementMethod · 0.65
getCountMethod · 0.65
setCountMethod · 0.65

Tested by

no test coverage detected