|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Listable
A simple linked-listed inteface, supporting both singly and doubly linked lists.
Unlike LinkedList, this interface
provides access to the list elements themselves, which
may necessary for some uses.
LinkedList| Method Summary | |
|---|---|
Listable |
getNext()
Return the Listable element following me, or null if I am the last element in the list. |
Listable |
getPrev()
Return the Listable element preceeding me, or null if I am the last element in the list. |
boolean |
hasNext()
Return true if there is a Listable element following me, false otherwise. |
boolean |
hasPrev()
Return true if there is a Listable element preceeding me, false otherwise. |
void |
setNext(Listable next)
Change my next element to next. |
void |
setPrev(Listable prev)
Change my preceeding element to prev. |
| Method Detail |
|---|
Listable getNext()
boolean hasNext()
void setNext(Listable next)
throws UnsupportedOperationException
getPrev()
value of next.
next - my new following sibling.
UnsupportedOperationException - if I am a read-only list.
Listable getPrev()
throws UnsupportedOperationException
UnsupportedOperationException - if I am a singly-linked list.
boolean hasPrev()
throws UnsupportedOperationException
UnsupportedOperationException - if I am a singly-linked list.
void setPrev(Listable prev)
throws UnsupportedOperationException
getNext()
value of prev.
prev - my new preceeding sibling.
UnsupportedOperationException - if I am a singly-linked or read-only list.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||