All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.neoremind.fountain.Iteration Maven / Gradle / Ivy

package net.neoremind.fountain;

import java.util.NoSuchElementException;

/**
 * 迭代器
 *
 * @author zhangxu
 */
interface Iteration {

    /**
     * Returns true if the iteration has more elements. (In other words, returns true if next
     * would return an element rather than throwing an exception.)
     *
     * @return true if the iterator has more elements.
     */
    boolean hasNext();

    /**
     * Returns the next element in the iteration.
     *
     * @return the next element in the iteration.
     *
     * @throws NoSuchElementException iteration has no more elements.
     */
    E next();

    /**
     * Returns the current element index;
     *
     * @return current element inde
     */
    int currentIndex();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy