simpletreeuos.java

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

JAVA
38
字号
/* SimpleTreeUos.java
 * ---------------------------------------------
 * Copyright (c) 2001 University of Saskatchewan
 * All Rights Reserved
 * --------------------------------------------- */

package dslib.tree;

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

/**	A Container interface that stores items in a binary tree.  It has methods 
	to access the item at the root, or either subtree.  It also has a method 
	to test for empty, and wipeOut to remove all items. */
public interface SimpleTreeUos extends ContainerUos
{
	/**	Contents of the root item. <br>
		PRECONDITION: <br>
		<ul>
			!isEmpty() 
		</ul> */
	public Object rootItem() throws ContainerEmptyUosException;
 
	/**	Right subtree of the root. <br>
		PRECONDITION: <br>
		<ul>
			!isEmpty() 
		</ul> */
	public SimpleTreeUos rootRightSubtree() throws ContainerEmptyUosException;
 
	/**	Left subtree of the root. <br>
		PRECONDITION: <br>
		<ul>
			!isEmpty() 
		</ul> */
	public SimpleTreeUos rootLeftSubtree() throws ContainerEmptyUosException;
}

⌨️ 快捷键说明

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