in commons-geometry-spherical/src/main/java/org/apache/commons/geometry/spherical/PointMap1SImpl.java [359:380]
public boolean hasNext() {
if (lowEntry == null && remaining > 0) {
lowEntry = getNextEntry(low);
if (lowEntry == null) {
low = getMap().descendingMap().entrySet().iterator();
lowEntry = getNextEntry(low);
}
}
if (highEntry == null && remaining > 0) {
highEntry = getNextEntry(high);
if (highEntry == null) {
high = getMap().entrySet().iterator();
highEntry = getNextEntry(high);
}
}
return lowEntry != null || highEntry != null;
}