|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.saxon.tree.linked.LineNumberMap
public class LineNumberMap
Line numbers are not held in nodes in the tree, because they are not usually needed. This class provides a map from element sequence numbers to line numbers: it is linked to the root node of the tree.
Constructor Summary | |
---|---|
LineNumberMap()
Create a LineNumberMap with an initial capacity of 200 nodes, which is expanded as necessary |
Method Summary | |
---|---|
int |
getColumnNumber(int sequence)
Get the column number corresponding to a given sequence number |
int |
getLineNumber(int sequence)
Get the line number corresponding to a given sequence number |
void |
setLineAndColumn(int sequence,
int line,
int column)
Set the line number corresponding to a given sequence number |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LineNumberMap()
Method Detail |
---|
public void setLineAndColumn(int sequence, int line, int column)
sequence
- the sequence number of the nodeline
- the line number position of the nodecolumn
- the column position of the nodepublic int getLineNumber(int sequence)
sequence
- the sequence number held in the node
public int getColumnNumber(int sequence)
sequence
- the sequence number held in the node
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |