multivalent.node

Class NodeCharSequence

public class NodeCharSequence extends Object implements CharSequence

java.lang.CharSequence over the document tree, as for used by java.util.regex.Pattern regular rexpressions. The sequence consists of the text of each leaf (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(Node root)
NodeCharSequence(Leaf startl, Leaf endl)
Method Summary
charcharAt(int index)
intlength()
MarkmarkAt(int index)
LeafnodeAt(int index)
CharSequencesubSequence(int start, int end)
inttextIndexOf(Leaf l)
StringtoString()

Constructor Detail

NodeCharSequence

public NodeCharSequence(Node root)

NodeCharSequence

public NodeCharSequence(Leaf startl, Leaf endl)

Method Detail

charAt

public char charAt(int index)

length

public int length()

markAt

public Mark markAt(int index)

nodeAt

public Leaf nodeAt(int index)

subSequence

public CharSequence subSequence(int start, int end)

textIndexOf

public int textIndexOf(Leaf l)

toString

public String toString()