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

Method contains

output/java_guava/1.4.17/Multisets.java:1018–1033  ·  view source on GitHub ↗
(@Nullable Object o)

Source from the content-addressed store, hash-verified

1016 abstract Multiset<E> multiset();
1017
1018 @Override
1019 public boolean contains(@Nullable Object o) {
1020 if (o instanceof Entry) {
1021 /*
1022 * The GWT compiler wrongly issues a warning here.
1023 */
1024 @SuppressWarnings("cast")
1025 Entry<?> entry = (Entry<?>) o;
1026 if (entry.getCount() <= 0) {
1027 return false;
1028 }
1029 int count = multiset().count(entry.getElement());
1030 return count == entry.getCount();
1031 }
1032 return false;
1033 }
1034
1035 // GWT compiler warning; see contains().
1036

Callers

nothing calls this directly

Calls 4

multisetMethod · 0.95
getCountMethod · 0.65
countMethod · 0.65
getElementMethod · 0.65

Tested by

no test coverage detected