searchableuos.java
来自「国外的数据结构与算法分析用书」· Java 代码 · 共 39 行
JAVA
39 行
/* SearchableUos.java
* ---------------------------------------------
* Copyright (c) 2001 University of Saskatchewan
* All Rights Reserved
* --------------------------------------------- */
package dslib.base;
import dslib.exception.*;
/** A ContainerUos class with a search routine and a cursor to
reference the item found. It can be set to continue searches
from the next item or restart from the beginning of the structure. */
public interface SearchableUos extends MembershipUos, CursorUos
{
/** Move the current position to next x or else set to !itemExists.
@param x item being sought */
public void search(Object x);
/* Suggested variable
Should a search continue from the next item?.
Set the variable to restart each search as default
protected boolean searchesContinue = false; */
/** Set searches to always start over. */
public void restartSearches();
// Suggested implementation
// {
// searchesContinue = false;
// }
/** Set searches to continue from the next item. */
public void resumeSearches();
// Suggested implementation
// {
// searchesContinue = true;
// }
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?