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

Method sizeImpl

output/java_guava/1.4.19/Multisets.java:1121–1127  ·  view source on GitHub ↗

An implementation of Multiset#size.

(Multiset<?> multiset)

Source from the content-addressed store, hash-verified

1119 */
1120
1121 static int sizeImpl(Multiset<?> multiset) {
1122 long size = 0;
1123 for (Entry<?> entry : multiset.entrySet()) {
1124 size += entry.getCount();
1125 }
1126 return Ints.saturatedCast(size);
1127 }
1128
1129 /**
1130 * 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