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

📄 keyedbasicdictuos.java

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

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

/**	A Container class that stores keyed items.  Items can be 
	inserted, and be deleted and obtained by key value.  All
	classes that implement this interface will be sets. */ 
public interface KeyedBasicDictUos extends ContainerUos
{
	/**	Does the structure contain key 'k'?. 
		@param k key whose presence is to be determined */
	public boolean has(Comparable k);
 
	/**	Insert x into the dictionary. <br>
		PRECONDITION: <br>
		<ul>
			!isFull() <br>
			!has(x.key())
		</ul>
		@param x item to be inserted into the dictionary */
	public void insert(KeyedUos x) throws ContainerFullUosException, DuplicateItemsUosException;

	/**	Delete the item with key i. <br>
		PRECONDITION: <br>
		<ul>
			has(i)
		</ul>
		@param i key of item to be deleted */
	public void delete(Comparable i) throws ItemNotFoundUosException;

	/**	An item with key i from the container. <br>
		PRECONDITION: <br>
		<ul>
			has(i)
		</ul>
		@param i key of item to be obtained from the dictionary */
	public KeyedUos obtain(Comparable i) throws ItemNotFoundUosException;
 
	/**	Set x to replace an item having the same key value as x. <br>
		PRECONDITION: <br>
		<ul>
			has(x.key())
		</ul>
		@param x item to replace another item with the same key value */
	public void set(KeyedUos x) throws ItemNotFoundUosException;
} 

⌨️ 快捷键说明

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