lineariteratoruos.java

来自「国外的数据结构与算法分析用书」· Java 代码 · 共 41 行

JAVA
41
字号
/* LinearIteratorUos.java
 * ---------------------------------------------
 * Copyright (c) 2001 University of Saskatchewan
 * All Rights Reserved
 * --------------------------------------------- */

package dslib.base;

import dslib.exception.AfterTheEndUosException;

/**	A basic iterator for moving through a collection of items linearly. 
	It utilizes a cursor to keep track of the current item of the 
	sequence, and has functions to move forward and to the front of 
	the sequence. */
public interface LinearIteratorUos extends CursorUos
{

	/**	Is the current position before the start of the structure?. */
	public boolean before();
 
	/**	Is the current position after the end of the structure?. */
	public boolean after();
 
	/**	Advance one item in the data structure. <br>
		PRECONDITION: <br>
		<ul>
			!after()
		</ul> */
	public void goForth() throws AfterTheEndUosException; 

	/**	Go to the first item in the structure. */
	public void goFirst();

	/**	Move to the position prior to the first element in the structure. */
	public void goBefore();

	/**	Move to the position after the last element in the structure. */
	public void goAfter();

} 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?