jds.util
Class DoubleLink
java.lang.Object
|
+--jds.util.DoubleLink
- public class DoubleLink
- extends java.lang.Object
- implements java.io.Serializable
DoubleLink - one link in a linked list;
for use with book
Classic Data Structures
in Java
by Timothy A Budd,
published by Addison-Wesley, 2001.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
value
public java.lang.Object value
- the value being held by this link
next
public DoubleLink next
- the next and previous links
prev
public DoubleLink prev
- the next and previous links
DoubleLink
public DoubleLink(java.lang.Object v,
DoubleLink n,
DoubleLink p)
- initialize a new link value
- Parameters:
v
- initial value for linkn
- next link in sequencep
- previous link in sequence
insertLink
public void insertLink(DoubleLink newLink)
- insert a new link into a sequence
- Parameters:
newlink
- the link to be inserted
insert
public DoubleLink insert(java.lang.Object newValue)
- insert a value into a sequence
- Parameters:
newValue
- the new value to be inserted
remove
public void remove()
- remove a link from a sequence