MCPcopy Index your code
hub / github.com/apache/groovy / hasNext

Method hasNext

src/main/java/groovy/lang/NumberRange.java:688–703  ·  view source on GitHub ↗

{@inheritDoc}

()

Source from the content-addressed store, hash-verified

686 * {@inheritDoc}
687 */
688 @Override
689 public boolean hasNext() {
690 fetchNextIfNeeded();
691 if (next == null) {
692 return false;
693 }
694 if (isAscending) {
695 return range.inclusiveRight
696 ? compareLessThanEqual(next, range.getTo())
697 : compareLessThan(next, range.getTo());
698 }
699 return range.inclusiveRight
700 ? compareGreaterThanEqual(next, range.getFrom())
701 : compareGreaterThan(next, range.getFrom());
702
703 }
704
705 /**
706 * {@inheritDoc}

Callers 6

getMethod · 0.95
calcSizeMethod · 0.95
subListMethod · 0.95
containsMethod · 0.95
stepMethod · 0.95
nextMethod · 0.95

Calls 7

fetchNextIfNeededMethod · 0.95
compareLessThanEqualMethod · 0.80
compareLessThanMethod · 0.80
compareGreaterThanMethod · 0.80
getToMethod · 0.65
getFromMethod · 0.65

Tested by

no test coverage detected