electric.util.list
Class LinkedList

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

public final class LinkedList
extends java.lang.Object

LinkedList.

Author:
webMethods

Constructor Summary
LinkedList()
           
 
Method Summary
 void add(ListNode node)
          Append the specified node to the end of this list.
 void add(ListNode node, ListNode newNode)
          Append the new node as a sibling of the existing node.
 void clear()
          Remove all the nodes.
 ListEnumeration elements()
           
 ListNode getFirst()
           
 ListNode getLast()
           
 void insert(ListNode node, ListNode newNode)
          Insert the new node as a sibling of the existing node.
 boolean isEmpty()
          Return true if this list is empty.
 void remove(ListNode node)
          Remove the specified node from this list.
 void replace(ListNode oldNode, ListNode newNode)
          Replace the old node with the new node in this list.
 int size()
          Return the number of nodes in this list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinkedList

public LinkedList()
Method Detail

isEmpty

public boolean isEmpty()
Return true if this list is empty.


add

public void add(ListNode node)
Append the specified node to the end of this list. If the new node was already in a document, remove it first.

Parameters:
node - The node to append.

remove

public void remove(ListNode node)
Remove the specified node from this list.

Parameters:
node - The node to remove.

replace

public void replace(ListNode oldNode,
                    ListNode newNode)
Replace the old node with the new node in this list. If the new node was already in a document, remove it first.

Parameters:
oldNode - The node to replace.
newNode - The new node.

add

public void add(ListNode node,
                ListNode newNode)
Append the new node as a sibling of the existing node. If the new node was already in a document, remove it first.

Parameters:
node - The existing node.
newNode - The new node.

insert

public void insert(ListNode node,
                   ListNode newNode)
Insert the new node as a sibling of the existing node. If the new node was already in a document, remove it first.

Parameters:
node - The existing node.
newNode - The new node.

getFirst

public ListNode getFirst()

getLast

public ListNode getLast()

size

public int size()
Return the number of nodes in this list.


clear

public void clear()
Remove all the nodes.


elements

public ListEnumeration elements()


copyright© 2001-2004 by webMethods All Rights Reserved.