// Hentet fra: // http://hg.openjdk.java.net/lambda/lambda/jdk/file/tip/src/share/classes/java/util/Iterator.java public interface IteratorUtdrag { /** * Returns {@code true} if the iteration has more elements. * (In other words, returns {@code true} if {@link #next} would * return an element rather than throwing an exception.) * * @return {@code true} if the iteration has more elements */ boolean hasNext(); /** * Returns the next element in the iteration. * * @return the next element in the iteration * @throws NoSuchElementException if the iteration has no more elements */ E next(); }