|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object DoubleNode
public class DoubleNode
The class DoubleNode holds two pointers and a character. It is used to represent a single node on a double linked list.
Constructor Summary | |
---|---|
DoubleNode()
Constructor with no arguments. |
|
DoubleNode(DoubleNode p,
char ch,
DoubleNode n)
Constructor |
Method Summary | |
---|---|
char |
getC()
|
DoubleNode |
getNext()
|
DoubleNode |
getPrev()
|
static void |
main(java.lang.String[] args)
Test driver for DoubleNode |
void |
setC(char c)
|
void |
setNext(DoubleNode next)
|
void |
setPrev(DoubleNode prev)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DoubleNode(DoubleNode p, char ch, DoubleNode n)
p
- is a pointer to a previous node.n
- is a pointer to a next node.ch
- is a character for this node.public DoubleNode()
Method Detail |
---|
public DoubleNode getPrev()
public void setPrev(DoubleNode prev)
public DoubleNode getNext()
public void setNext(DoubleNode next)
public char getC()
public void setC(char c)
char
- c is assigned to this nodepublic java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |