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

Method lastNode

output/java_guava/1.4.18/TreeMultiset.java:395–417  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

393 }
394
395 @Nullable
396 private AvlNode<E> lastNode() {
397 AvlNode<E> root = rootReference.get();
398 if (root == null) {
399 return null;
400 }
401 AvlNode<E> node;
402 if (range.hasUpperBound()) {
403 E endpoint = range.getUpperEndpoint();
404 node = rootReference.get().floor(comparator(), endpoint);
405 if (node == null) {
406 return null;
407 }
408
409 if (range.getUpperBoundType() == BoundType.OPEN
410 && comparator().compare(endpoint, node.getElement()) == 0) {
411 node = node.pred;
412 }
413 } else {
414 node = header.pred;
415 }
416 return (node == header || !range.contains(node.getElement())) ? null : node;
417 }
418
419 @Override
420 Iterator<Entry<E>> entryIterator() {

Callers 1

Calls 9

getMethod · 0.65
comparatorMethod · 0.65
getElementMethod · 0.65
containsMethod · 0.65
hasUpperBoundMethod · 0.45
getUpperEndpointMethod · 0.45
floorMethod · 0.45
getUpperBoundTypeMethod · 0.45
compareMethod · 0.45

Tested by

no test coverage detected