dispenseruos.java

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

JAVA
33
字号
/* DispenserUos.java
 * ---------------------------------------------
 * Copyright (c) 2001 University of Saskatchewan
 * All Rights Reserved
 * --------------------------------------------- */
 
package dslib.base;

import dslib.exception.*;


/**	A ContainerUos class which keeps track of the current item as 
	insertions are made.  Only the current item can be deleted.  
	The current item depends on the type of dispenser. */
public interface DispenserUos extends ContainerUos, CursorUos
{
	/**	Insert x into the data structure. <br>
		PRECONDITION: <br>
		<ul>
			!isFull()
			!((this instanceof SetDictUos) && has(x))
		</ul>
		@param x item to be inserted into the data structure */
	public void insert(Object x) throws ContainerFullUosException, DuplicateItemsUosException;
 
	/**	Delete current item from the data structure. 
		PRECONDITION: <br>
		<ul>
			itemExists() 
		</ul> */
	public void deleteItem() throws NoCurrentItemUosException;
}

⌨️ 快捷键说明

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