|
Release Planner v1.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--rp.util.TwoList
A utility baseclass providing storage and associated functions operating on two doubly-linked circular lists, A and B. One element of the list is specially designated as the head.
Nested Class Summary | |
protected static interface |
TwoList.Iterator
Used for iterating over TwoList lists (A or B). |
protected static class |
TwoList.IteratorA
An implementation of the Iterator interface for A-lists. |
protected static class |
TwoList.IteratorB
An implementation of the Iterator interface for B-lists. |
Field Summary | |
protected TwoList |
headA
|
protected TwoList |
headB
|
protected TwoList |
nextA
|
protected TwoList |
nextB
|
protected int |
numsA
|
protected int |
numsB
|
protected TwoList |
prevA
|
protected TwoList |
prevB
|
Constructor Summary | |
protected |
TwoList()
Initializes node storage as unused. |
Method Summary | |
protected void |
addA(TwoList head)
Adds this element at the rear of the A-list headed by the parameter. |
protected void |
addB(TwoList head)
Adds this element at the rear of the B-list headed by the parameter. |
protected int |
countA()
Returns the number of nodes in the A-list of which this node is a part (or head). |
protected int |
countB()
Returns the number of nodes in the B-list of which this node is a part (or head). |
protected void |
decommissionAsHeadA()
Frees this A head node to be used again. |
protected void |
decommissionAsHeadB()
Frees this B head node to be used again. |
protected TwoList |
firstA()
Returns the first element on the A-list, or null if none. |
protected TwoList |
firstB()
Returns the first element on the B-list, or null if none. |
TwoList |
headA()
Returns the head of the A-list or null if not initialized. |
TwoList |
headB()
Returns the head of the B-list or null if not initialized. |
protected void |
initAsHeadA()
Initializes this node as the head of an empty A-list. |
protected void |
initAsHeadB()
Initializes this node as the head of an empty B-list. |
protected boolean |
isElementA()
Tests if this node is an element of an A-list (but not the head) |
protected boolean |
isElementB()
Tests if this node is an element of a B-list (but not the head) |
protected boolean |
isHeadA()
Tests if this node is a head of an A-list. |
protected boolean |
isHeadB()
Tests if this node is a head of a B-list. |
protected void |
rmA()
Removes this element from the A-list. |
protected void |
rmB()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected int numsA
protected int numsB
protected TwoList headA
protected TwoList headB
protected TwoList nextA
protected TwoList nextB
protected TwoList prevA
protected TwoList prevB
Constructor Detail |
protected TwoList()
Method Detail |
protected void initAsHeadA()
protected void initAsHeadB()
protected void decommissionAsHeadA()
protected void decommissionAsHeadB()
protected boolean isHeadA()
protected boolean isHeadB()
protected boolean isElementA()
protected boolean isElementB()
protected int countA()
protected int countB()
public TwoList headA()
public TwoList headB()
protected TwoList firstA()
protected TwoList firstB()
protected void addA(TwoList head)
head
- the head of the list to which to add this elementprotected void addB(TwoList head)
head
- the head of the list to which to add this elementprotected void rmA()
protected void rmB()
|
Release Planner v1.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |