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

Method sizeImpl

output/java_guava/1.4.18/Multisets.java:1122–1128  ·  view source on GitHub ↗

An implementation of Multiset#size.

(Multiset<?> multiset)

Source from the content-addressed store, hash-verified

1120 */
1121
1122 static int sizeImpl(Multiset<?> multiset) {
1123 long size = 0;
1124 for (Entry<?> entry : multiset.entrySet()) {
1125 size += entry.getCount();
1126 }
1127 return Ints.saturatedCast(size);
1128 }
1129
1130 /**
1131 * Used to avoid http://bugs.sun.com/view_bug.do?bug_id=6558557

Callers 2

standardSizeMethod · 0.95
sizeMethod · 0.95

Calls 3

saturatedCastMethod · 0.95
entrySetMethod · 0.65
getCountMethod · 0.65

Tested by

no test coverage detected