|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectCITS2200.ListLinked
public class ListLinked
Singly linked implementation of a List ADT
| Constructor Summary | |
|---|---|
ListLinked()
create a new list |
|
| Method Summary | |
|---|---|
void |
afterLast(WindowLinked w)
put a window over after-last position |
void |
beforeFirst(WindowLinked w)
put a window over before-first position |
Object |
delete(WindowLinked w)
delete and return the object under a window, and place window over the next item |
Object |
examine(WindowLinked w)
examine the object under a window |
void |
insertAfter(Object e,
WindowLinked w)
insert an item after a window |
void |
insertBefore(Object e,
WindowLinked w)
insert an item before a window |
boolean |
isAfterLast(WindowLinked w)
check if the window is over the after-last position |
boolean |
isBeforeFirst(WindowLinked w)
check if the window is over the before-first position |
boolean |
isEmpty()
check if the list is empty |
void |
next(WindowLinked w)
move a window to the next position |
void |
previous(WindowLinked w)
move a window to the previous position |
Object |
replace(Object e,
WindowLinked w)
replace the object under a window |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ListLinked()
| Method Detail |
|---|
public boolean isEmpty()
isEmpty in interface Listpublic boolean isBeforeFirst(WindowLinked w)
isBeforeFirst in interface Listw - the window
public boolean isAfterLast(WindowLinked w)
isAfterLast in interface Listw - the window
public void beforeFirst(WindowLinked w)
beforeFirst in interface Listw - the window to placepublic void afterLast(WindowLinked w)
afterLast in interface Listw - the window to place
public void next(WindowLinked w)
throws OutOfBounds
next in interface Listw - the window
OutOfBounds - if the window is past the end of the list
public void previous(WindowLinked w)
throws OutOfBounds
previous in interface Listw - the window
OutOfBounds - if the window is before the start of the list
public void insertAfter(Object e,
WindowLinked w)
throws OutOfBounds
insertAfter in interface Liste - the item to insertw - the window
OutOfBounds - if the window is past the end of the list
public void insertBefore(Object e,
WindowLinked w)
throws OutOfBounds
insertBefore in interface Liste - the item to insertw - the window
OutOfBounds - if the window is before the start of the list
public Object examine(WindowLinked w)
throws OutOfBounds
examine in interface Listw - the window
OutOfBounds - if the window is outside the list
public Object replace(Object e,
WindowLinked w)
throws OutOfBounds
replace in interface Liste - the new objectw - the window
OutOfBounds - if the window is outside the list
public Object delete(WindowLinked w)
throws OutOfBounds
delete in interface Listw - the window
OutOfBounds - if the window is outside the list
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||