electric.util.list
Class ListNode

java.lang.Object
  extended byelectric.util.list.ListNode

public class ListNode
extends java.lang.Object

ListNode is a Node in a doubly-linked list.

Author:
webMethods

Constructor Summary
ListNode()
           
ListNode(java.lang.Object object)
           
 
Method Summary
 LinkedList getList()
           
 ListNode getNext()
          Return my next sibling, or null if I have none.
 java.lang.Object getObject()
           
 ListNode getPrevious()
          Return my previous sibling, or null if I have none.
 boolean remove()
          If I am in a list, remove myself and return true, otherwise return false.
 void setNext(ListNode node)
          Set my next sibling to be the specified node.
 void setPrevious(ListNode node)
          Set my previous sibling to be the specified node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListNode

public ListNode()

ListNode

public ListNode(java.lang.Object object)
Parameters:
object -
Method Detail

getObject

public java.lang.Object getObject()

getList

public LinkedList getList()

getPrevious

public ListNode getPrevious()
Return my previous sibling, or null if I have none.


getNext

public ListNode getNext()
Return my next sibling, or null if I have none.


setNext

public void setNext(ListNode node)
Set my next sibling to be the specified node. If the node is already a member of a list, remove it from that list.

Parameters:
node - The node to add

setPrevious

public void setPrevious(ListNode node)
Set my previous sibling to be the specified node. If the node is already a member of a list, remove it from that list.

Parameters:
node - The node to add

remove

public boolean remove()
If I am in a list, remove myself and return true, otherwise return false.



copyright© 2001-2004 by webMethods All Rights Reserved.