⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 keyeddictuos.java

📁 国外的数据结构与算法分析用书
💻 JAVA
字号:
/* KeyedDictUos.java
 * ---------------------------------------------
 * Copyright (c) 2001 University of Saskatchewan
 * All Rights Reserved
 * --------------------------------------------- */
 
package dslib.dictionary;

import dslib.base.*;
import dslib.exception.*;

/**	A keyed Dictionary class with the usual routines for inserting, 
	deleting, setting and obtaining items by key.  It also includes 
	a KeyedLinearIteratorUos to move through the dictionary, and deleteItem 
	to delete the current item. It also has a search procedure and a 
	frequency function. */
public interface KeyedDictUos extends KeyedBasicDictUos, KeyedLinearIteratorUos, SavableCursorUos
{
	/**	Move to the item with key i or else set to !itemExists.
		@param i key being sought */
	public void search(Comparable i);

	/**	Delete the current item from the data structure. 
		PRECONDITION: <br>
		<ul>
			itemExists() 
		</ul> */
	public void deleteItem() throws NoCurrentItemUosException;
	
	/**	The number of times key i occurs within the dictionary. 
		@param i item to check how often it occurs in the dictionary */
	public int frequency(Comparable i);
		
	/**	Replace the current item with another item having the same key. <br>
		PRECONDITION: <br>
		<ul>
			itemExists() <br>
	   		!(x.key().compareTo(itemKey())!=0)
		</ul>
		@param x item to replace the current item */
	public void setItem(KeyedUos x) throws NoCurrentItemUosException, InvalidArgumentUosException;
} 

⌨️ 快捷键说明

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