org.nutz.lang.Each Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of nutz Show documentation
Show all versions of nutz Show documentation
Nutz, which is a collections of lightweight frameworks, each of them can be used independently
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