|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--DoubleLink.DualSequence
DualSequence models a sequence of objects so such that: -- objects at added to the front and to the rear of the sequence; -- objects can be removed from the front and rear of the sequence; -- the sequence's contents can be displayed from front to rear and from rear to front (that is, in reverse order)
Constructor Summary | |
DualSequence()
Constructor DualSequence constructs an empty sequence |
Method Summary | |
void |
addToFront(java.lang.Object ob)
addToFront adds a new object to the front of this sequence |
void |
addToRear(java.lang.Object ob)
addToRear adds a new object to the end of this sequence |
java.lang.Object |
removeFromFront()
removeFromFront deletes the front object of this sequence |
java.lang.Object |
removeFromRear()
removeFromRear deletes the rear object of this sequence |
java.lang.String |
toString()
toString constructs a string representation of the sequence from front to rear |
java.lang.String |
toStringReversed()
toStringReversed constructs a string representation of the sequence in reverse order, from rear to front |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public DualSequence()
Method Detail |
public void addToFront(java.lang.Object ob)
ob
- - the object addedpublic void addToRear(java.lang.Object ob)
ob
- - the object addedpublic java.lang.Object removeFromFront()
public java.lang.Object removeFromRear()
public java.lang.String toString()
public java.lang.String toStringReversed()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |