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

📄 dictuos.java

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

import dslib.base.*;

/**	A Dictionary class with search capabilities to set the 
	current item.  It also includes a LinearIteratorUos to move 
	through the dictionary, and deleteItem to delete the current item. 
	It has a frequency routine and the basic dictionary routines: has, 
	delete, insert, obtain, and isEmpty.  All classes that implement 
	this interface will be bags (except for SetDictUos). */
public interface DictUos extends BasicDictUos, SearchableUos, DispenserUos, 
				LinearIteratorUos, SavableCursorUos
{
	/**	Suggested implementation
		The number of times x occurs within the dictionary
		@param x item to check how often it occurs in the dictionary */
	public int frequency(Object x);
//  	{
//  		int result = 0;
//  		CursorUos saveCurrentPos = currentPosition();
//  		boolean saveSearchMode = searchesContinue;
//  		restartSearches();
//  		search(i);
//  		resumeSearches();
//  		while (itemExists())
//  		{
//  			result++;
//  			search(i);
//  		}
//  		goPosition(saveCurrentPos);
//  		searchesContinue = saveSearchMode;
//  		return result;
//  	} 
}

⌨️ 快捷键说明

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