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

Method count

output/java_guava/1.4.17/TreeMultiset.java:570–579  ·  view source on GitHub ↗
(Comparator<? super E> comparator, E e)

Source from the content-addressed store, hash-verified

568
569
570 public int count(Comparator<? super E> comparator, E e) {
571 int cmp = comparator.compare(e, elem);
572 if (cmp < 0) {
573 return (left == null) ? 0 : left.count(comparator, e);
574 } else if (cmp > 0) {
575 return (right == null) ? 0 : right.count(comparator, e);
576 } else {
577 return elemCount;
578 }
579 }
580
581 private AvlNode<E> addRightChild(E e, int count) {
582 right = new AvlNode<E>(e, count);

Callers

nothing calls this directly

Calls 2

countMethod · 0.65
compareMethod · 0.45

Tested by

no test coverage detected