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

Method floor

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

Source from the content-addressed store, hash-verified

918 }
919
920 @Nullable
921 private AvlNode<E> floor(Comparator<? super E> comparator, E e) {
922 int cmp = comparator.compare(e, elem);
923 if (cmp > 0) {
924 return (right == null) ? this : MoreObjects.firstNonNull(right.floor(comparator, e), this);
925 } else if (cmp == 0) {
926 return this;
927 } else {
928 return (left == null) ? null : left.floor(comparator, e);
929 }
930 }
931
932 @Override
933 public E getElement() {

Callers 1

lastNodeMethod · 0.45

Calls 2

firstNonNullMethod · 0.95
compareMethod · 0.45

Tested by

no test coverage detected