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

org.nutz.lang.Each Maven / Gradle / Ivy

Go to download

Nutz, which is a collections of lightweight frameworks, each of them can be used independently

There is a newer version: 1.r.72
Show newest version
package org.nutz.lang;

/**
 * 异常回调接口
 * 
 * @author zozoh([email protected])
 * @param 
 */
public interface Each {

    /**
     * 回调接口
     * 
     * @param index
     *            当前项目的下标
     * @param ele
     *            当前项目
     * @param length
     *            集合总长度,当然并不是所有的迭代器都会给出总长度的,-1 表示未知
     * @throws ExitLoop
     *             抛出这个异常,表示你打算退出循环
     * @throws ContinueLoop
     *             抛出这个异常,表示你打算停止递归,但是不会停止循环
     * @throws LoopException
     *             抛出这个异常,表示你打算退出循环,并且将会让迭代器替你将包裹的异常抛出
     */
    void invoke(int index, T ele, int length) throws ExitLoop, ContinueLoop, LoopException;

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy