Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

WebLogic Server 6.0sp2 API Reference

## weblogic.apache.xalan.xpath
Class MutableNodeListImpl

    java.lang.Object
      |
      +--weblogic.apache.xalan.xpath.xml.NodeVector
            |
            +--weblogic.apache.xalan.xpath.MutableNodeListImpl

public class MutableNodeListImpl
extends NodeVector
implements MutableNodeList

Implementation of MutableNodeList.

This class is based on an implementation from the Apache XML Project. In future releases the XML parser, XSLT processor, and associated classes will likely be updated to be based on a later version of the Apache implementations. Since Apache does not guarantee backwards compatibility between versions of their software, we cannot guarantee backwards compatibility of any of the classes contained in the weblogic.apache package or sub-packages.

Author:
  Copyright © 2001 BEA Systems, Inc. All Rights Reserved.
See Also:
  Serialized Form

Fields inherited from class weblogic.apache.xalan.xpath.xml.NodeVector
`m_map`

Constructor Summary
`MutableNodeListImpl()` Create an empty nodelist.
`MutableNodeListImpl(int blocksize)` Create an empty nodelist.
`MutableNodeListImpl(org.w3c.dom.Node node)` Create a MutableNodeListImpl, and copy the members of the given nodelist into it.
`MutableNodeListImpl(org.w3c.dom.NodeList nodelist)` Create a MutableNodeListImpl, and copy the members of the given nodelist into it.

Method Summary
`void` | `addNode(org.w3c.dom.Node n)` Add a node.
`int` | `addNodeInDocOrder(org.w3c.dom.Node node, boolean test, XPathSupport support)` Add the node into a vector of nodes where it should occur in document order.
`int` | `addNodeInDocOrder(org.w3c.dom.Node node, XPathSupport support)` Add the node into a vector of nodes where it should occur in document order.
`void` | `addNodes(org.w3c.dom.NodeList nodelist)` Copy NodeList members into this nodelist, adding in document order.
`void` | `addNodesInDocOrder(org.w3c.dom.NodeList nodelist, XPathSupport support)` Copy NodeList members into this nodelist, adding in document order.
`boolean` | `checkDups()`
`boolean` | `checkDups(org.w3c.dom.Node node)` Check for duplicates, for diagnostics.
`int` | `getLength()` The number of nodes in the list.
`void` | `insertNode(org.w3c.dom.Node n, int pos)` Insert a node at a given position.
`static boolean` | `isNodeAfter(org.w3c.dom.Node node1, org.w3c.dom.Node node2, XPathSupport support)` Figure out if node2 should be placed after node1 when placing nodes in a list that is to be sorted in document order.
`org.w3c.dom.Node` | `item(int index)` Returns the `index`th item in the collection.
`void` | `removeNode(org.w3c.dom.Node n)` Remove a node.
`void` | `setItemNull(int pos)` Set a item to null, so the list doesn't have to keep being compressed.

Methods inherited from class weblogic.apache.xalan.xpath.xml.NodeVector
`addElement, appendNodes, contains, elementAt, indexOf, indexOf, insertElementAt, removeAllElements, removeElement, removeElementAt, setElementAt, size`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MutableNodeListImpl

    public MutableNodeListImpl()

  Create an empty nodelist.

### MutableNodeListImpl

    public MutableNodeListImpl(int blocksize)

  Create an empty nodelist.

### MutableNodeListImpl

    public MutableNodeListImpl(org.w3c.dom.NodeList nodelist)

  Create a MutableNodeListImpl, and copy the members of the given nodelist into it.

### MutableNodeListImpl

    public MutableNodeListImpl(org.w3c.dom.Node node)

  Create a MutableNodeListImpl, and copy the members of the given nodelist into it.

Method Detail

### item

    public org.w3c.dom.Node item(int index)

  Returns the `index`th item in the collection. If `index` is greater than or equal to the number of nodes in the list, this returns `null`.

  Parameters:
    `index` - Index into the collection.
  Returns:
    The node at the `index`th position in the `NodeList`, or `null` if that is not a valid index.

### getLength

    public int getLength()

  The number of nodes in the list. The range of valid child node indices is 0 to `length-1` inclusive.

### checkDups

    public boolean checkDups(org.w3c.dom.Node node)

  Check for duplicates, for diagnostics.

### checkDups

    public boolean checkDups()

### addNode

    public void addNode(org.w3c.dom.Node n)

  Add a node.
  Specified by:
    addNode in interface MutableNodeList

### insertNode

    public void insertNode(org.w3c.dom.Node n,
                           int pos)

  Insert a node at a given position.
  Specified by:
    insertNode in interface MutableNodeList

### removeNode

    public void removeNode(org.w3c.dom.Node n)

  Remove a node.
  Specified by:
    removeNode in interface MutableNodeList

### setItemNull

    public void setItemNull(int pos)

  Set a item to null, so the list doesn't have to keep being compressed.
  Specified by:
    setItemNull in interface MutableNodeList

### addNodes

    public void addNodes(org.w3c.dom.NodeList nodelist)

  Copy NodeList members into this nodelist, adding in document order. If a node is null, don't add it.
  Specified by:
    addNodes in interface MutableNodeList

### addNodesInDocOrder

    public void addNodesInDocOrder(org.w3c.dom.NodeList nodelist,
                                   XPathSupport support)

  Copy NodeList members into this nodelist, adding in document order. If a node is null, don't add it.
  Specified by:
    addNodesInDocOrder in interface MutableNodeList

### addNodeInDocOrder

    public int addNodeInDocOrder(org.w3c.dom.Node node,
                                 boolean test,
                                 XPathSupport support)

  Add the node into a vector of nodes where it should occur in document order.
  Specified by:
    addNodeInDocOrder in interface MutableNodeList

  Parameters:
    `v` - Vector of nodes, presumably containing Nodes
    `obj` - Node object.
    `test` - true if we should test for doc order
  Returns:
    insertIndex.

### addNodeInDocOrder

    public int addNodeInDocOrder(org.w3c.dom.Node node,
                                 XPathSupport support)

  Add the node into a vector of nodes where it should occur in document order.
  Specified by:
    addNodeInDocOrder in interface MutableNodeList

  Parameters:
    `v` - Vector of nodes, presumably containing Nodes
    `obj` - Node object.

### isNodeAfter

    public static boolean isNodeAfter(org.w3c.dom.Node node1,
                                      org.w3c.dom.Node node2,
                                      XPathSupport support)

  Figure out if node2 should be placed after node1 when placing nodes in a list that is to be sorted in document order. Assumes that node1 and node2 are not equal. NOTE: Make sure this does the right thing with attribute nodes!!!

  Returns:
    true if node2 should be placed after node1, and false if node2 should be placed before node1.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://e-docs.bea.com/wls/docs60
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD