Multivalent API

multivalent.node
Class NodeCharSequence

java.lang.Object
  extended by multivalent.node.NodeCharSequence
All Implemented Interfaces:
java.lang.CharSequence

public class NodeCharSequence
extends java.lang.Object
implements java.lang.CharSequence

CharSequence over the document tree, as for used by regular rexpressions. The sequence consists of the text of each leaf (Node.getName(), separated by spaces. The same instance can be used for many searches or other operations. At its creation, this class takes a snapshot of the tree and ignores subsequent modification to it.

Version:
$Revision$ $Date$

Constructor Summary
NodeCharSequence(Leaf startl, Leaf endl)
           
NodeCharSequence(Node root)
           
 
Method Summary
 char charAt(int index)
           
 int length()
           
 Mark markAt(int index)
           
 Leaf nodeAt(int index)
           
 java.lang.CharSequence subSequence(int start, int end)
           
 int textIndexOf(Leaf l)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NodeCharSequence

public NodeCharSequence(Node root)

NodeCharSequence

public NodeCharSequence(Leaf startl,
                        Leaf endl)
Method Detail

charAt

public char charAt(int index)
Specified by:
charAt in interface java.lang.CharSequence

length

public int length()
Specified by:
length in interface java.lang.CharSequence

subSequence

public java.lang.CharSequence subSequence(int start,
                                          int end)
Specified by:
subSequence in interface java.lang.CharSequence

nodeAt

public Leaf nodeAt(int index)

markAt

public Mark markAt(int index)

textIndexOf

public int textIndexOf(Leaf l)

toString

public java.lang.String toString()
Specified by:
toString in interface java.lang.CharSequence
Overrides:
toString in class java.lang.Object

Multivalent API