ps://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Iterator.html#forEachRemaining(java.util.function.Consumer)" title="class or interface in java.util" class="external-link">forEachRemaining</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Iterator.html#hasNext()" title="class or interface in java.util" class="external-link">hasNext</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Iterator.html#next()" title="class or i