|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.irs.jam.DList
DList (doubly linked list)
Field Summary | |
protected int |
_count
|
protected DLink |
_head
|
Constructor Summary | |
DList()
|
|
DList(java.lang.Object ent)
|
Method Summary | |
protected void |
addAfter(DLink current,
DList list)
Add a list after the given element |
protected void |
addAfter(DLink current,
java.lang.Object ent)
Add a single entry after the given element |
protected void |
addBefore(DLink current,
DList list)
Add a list after the given element |
protected void |
addBefore(DLink current,
java.lang.Object ent)
Add a single entry before the given element |
void |
append(DList list)
Add at tail of list |
void |
append(java.lang.Object ent)
Add at tail of list |
void |
clear()
Remove all links |
protected void |
createHead()
Create the start of the list |
java.lang.Object |
first()
Return the first element of the list |
int |
getCount()
Returns the number of elements in the list |
void |
insert(DList list)
|
void |
insert(java.lang.Object ent)
add at head of list |
boolean |
isEmpty()
Returns whether the list has elements or not |
java.lang.Object |
last()
Return the last element of the list |
java.lang.Object |
nth(int n)
MJH - Return the nth (1-based) element of the list |
java.lang.Object |
pop()
Return and remove head of list |
protected DLink |
remove(DLink current)
|
java.lang.Object |
removeNth(int n)
MJH - Remove the nth (1-based) element of the list |
protected DLink |
replace(DLink current,
java.lang.Object ent)
|
java.lang.Object |
replaceNth(java.lang.Object ent,
int n)
MJH - Set the nth (1-based) element of the list |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected DLink _head
protected int _count
Constructor Detail |
public DList()
public DList(java.lang.Object ent)
Method Detail |
public void insert(java.lang.Object ent)
public void insert(DList list)
public void append(java.lang.Object ent)
public void append(DList list)
public void clear()
public java.lang.Object first()
public java.lang.Object nth(int n)
public java.lang.Object last()
public java.lang.Object pop()
public int getCount()
public boolean isEmpty()
protected void createHead()
protected void addAfter(DLink current, java.lang.Object ent)
protected void addAfter(DLink current, DList list)
protected void addBefore(DLink current, java.lang.Object ent)
protected void addBefore(DLink current, DList list)
protected DLink remove(DLink current)
public java.lang.Object removeNth(int n)
protected DLink replace(DLink current, java.lang.Object ent)
public java.lang.Object replaceNth(java.lang.Object ent, int n)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |