DAT
Class ListLinked

java.lang.Object
  |
  +--DAT.ListLinked
All Implemented Interfaces:
List

public synchronized class ListLinked
extends java.lang.Object
implements List


Constructor Summary
ListLinked()
           
 
Method Summary
 void afterLast(WindowLinked)
          put a window over after-last position
 void beforeFirst(WindowLinked)
          put a window over before-first position
 java.lang.Object delete(WindowLinked)
          delete and return the object under a window, and place window over the next item
 java.lang.Object examine(WindowLinked)
          examine the object under a window
 void insertAfter(java.lang.Object, WindowLinked)
          insert an item after a window
 void insertBefore(java.lang.Object, WindowLinked)
          insert an item before a window
 boolean isAfterLast(WindowLinked)
          check if the window is over the after-last position
 boolean isBeforeFirst(WindowLinked)
          check if the window is over the before-first position
 boolean isEmpty()
          check if the list is empty
 void next(WindowLinked)
          move a window to the next position
 void previous(WindowLinked)
          move a window to the previous position
 java.lang.Object replace(java.lang.Object, WindowLinked)
          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

ListLinked

public ListLinked()
Method Detail

isEmpty

public boolean isEmpty()
Description copied from interface: List
check if the list is empty

Specified by:
isEmpty in interface List
Returns:
true if the list is empty, false otherwise

isBeforeFirst

public boolean isBeforeFirst(WindowLinked)
Description copied from interface: List
check if the window is over the before-first position

Specified by:
isBeforeFirst in interface List
Parameters:
- the window
Returns:
true if the window is over before-first, false otherwise

isAfterLast

public boolean isAfterLast(WindowLinked)
Description copied from interface: List
check if the window is over the after-last position

Specified by:
isAfterLast in interface List
Parameters:
- the window
Returns:
true if the window is over after-last, false otherwise

beforeFirst

public void beforeFirst(WindowLinked)
Description copied from interface: List
put a window over before-first position

Specified by:
beforeFirst in interface List
Parameters:
- the window to place

afterLast

public void afterLast(WindowLinked)
Description copied from interface: List
put a window over after-last position

Specified by:
afterLast in interface List
Parameters:
- the window to place

next

public void next(WindowLinked)
          throws OutOfBounds
Description copied from interface: List
move a window to the next position

Specified by:
next in interface List
Parameters:
- the window
Throws:
OutOfBounds - if the window is past the end of the list

previous

public void previous(WindowLinked)
              throws OutOfBounds
Description copied from interface: List
move a window to the previous position

Specified by:
previous in interface List
Parameters:
- the window
Throws:
OutOfBounds - if the window is before the start of the list

insertAfter

public void insertAfter(java.lang.Object,
                        WindowLinked)
                 throws OutOfBounds
Description copied from interface: List
insert an item after a window

Specified by:
insertAfter in interface List
Parameters:
- the item to insert
- the window
Throws:
OutOfBounds - if the window is past the end of the list

insertBefore

public void insertBefore(java.lang.Object,
                         WindowLinked)
                  throws OutOfBounds
Description copied from interface: List
insert an item before a window

Specified by:
insertBefore in interface List
Parameters:
- the item to insert
- the window
Throws:
OutOfBounds - if the window is before the start of the list

examine

public java.lang.Object examine(WindowLinked)
                         throws OutOfBounds
Description copied from interface: List
examine the object under a window

Specified by:
examine in interface List
Parameters:
- the window
Returns:
the object under the window
Throws:
OutOfBounds - if the window is outside the list

replace

public java.lang.Object replace(java.lang.Object,
                                WindowLinked)
                         throws OutOfBounds
Description copied from interface: List
replace the object under a window

Specified by:
replace in interface List
Parameters:
- the new object
- the window
Returns:
the object previously under the window
Throws:
OutOfBounds - if the window is outside the list

delete

public java.lang.Object delete(WindowLinked)
                        throws OutOfBounds
Description copied from interface: List
delete and return the object under a window, and place window over the next item

Specified by:
delete in interface List
Parameters:
- the window
Returns:
the object previously under the window
Throws:
OutOfBounds - if the window is outside the list