org.apache.commons.jxpath
Class BasicNodeSet

java.lang.Object
  extended by org.apache.commons.jxpath.BasicNodeSet
All Implemented Interfaces:
NodeSet

public class BasicNodeSet
extends java.lang.Object
implements NodeSet

A simple implementation of NodeSet that behaves as a collection of pointers.

Version:
$Revision: 652845 $ $Date: 2008-05-02 12:46:46 -0500 (Fri, 02 May 2008) $
Author:
Dmitri Plotnikov

Field Summary
private  java.util.List nodes
           
private  java.util.List pointers
           
private  java.util.List readOnlyPointers
           
private  java.util.List values
           
 
Constructor Summary
BasicNodeSet()
           
 
Method Summary
 void add(NodeSet nodeSet)
          Add the specified NodeSet to this NodeSet.
 void add(Pointer pointer)
          Add a pointer to this NodeSet.
private  void clearCacheLists()
          Clear cache list members.
 java.util.List getNodes()
          Returns a list of nodes.
 java.util.List getPointers()
          Returns a list of pointers for all nodes in the set.
 java.util.List getValues()
          Returns a list of values of all contained pointers.
 void remove(Pointer pointer)
          Remove a pointer from this NodeSet.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

pointers

private java.util.List pointers

readOnlyPointers

private java.util.List readOnlyPointers

nodes

private java.util.List nodes

values

private java.util.List values
Constructor Detail

BasicNodeSet

public BasicNodeSet()
Method Detail

add

public void add(Pointer pointer)
Add a pointer to this NodeSet.

Parameters:
pointer - to add

add

public void add(NodeSet nodeSet)
Add the specified NodeSet to this NodeSet.

Parameters:
nodeSet - to add

remove

public void remove(Pointer pointer)
Remove a pointer from this NodeSet.

Parameters:
pointer - to remove

getPointers

public java.util.List getPointers()
Description copied from interface: NodeSet
Returns a list of pointers for all nodes in the set.

Specified by:
getPointers in interface NodeSet
Returns:
List

getNodes

public java.util.List getNodes()
Description copied from interface: NodeSet
Returns a list of nodes.

Specified by:
getNodes in interface NodeSet
Returns:
List

getValues

public java.util.List getValues()
Description copied from interface: NodeSet
Returns a list of values of all contained pointers.

Specified by:
getValues in interface NodeSet
Returns:
List

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

clearCacheLists

private void clearCacheLists()
Clear cache list members.