📄 simplelistuos.java
字号:
/* SimpleListUos.java
* ---------------------------------------------
* Copyright (c) 2001 University of Saskatchewan
* All Rights Reserved
* --------------------------------------------- */
package dslib.list;
import dslib.exception.*;
import dslib.base.ContainerUos;
/** A simple list interface with methods to access, insert and delete
items at the front of the list. It also has a test for empty
and a wipeOut method. */
public interface SimpleListUos extends ContainerUos
{
/** Insert x as the first element in the list. <br>
PRECONDITION: <br>
<ul>
!isFull()
</ul>
@param x item to be inserted in the list */
public void insertFirst(Object x) throws ContainerFullUosException;
/** Return the first item. <br>
PRECONDITION: <br>
<ul>
!isEmpty()
</ul> */
public Object firstItem() throws ContainerEmptyUosException;
/** Delete the first item from the list. <br>
PRECONDITION: <br>
<ul>
!isEmpty()
</ul> */
public void deleteFirst() throws ContainerEmptyUosException;
/** Returns a semi-deep clone of the list structure. */
public SimpleListUos listClone();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -