Class XmlPosition
java.lang.Object
com.github.oowekyala.ooxml.messages.XmlPosition
Represents the location of an XML node in a file. This is a text range,
located on a single line.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateXmlPosition(int line, int column) XmlPosition(String systemId, int line, int column) XmlPosition(String systemId, int line, int column, int length) -
Method Summary
Modifier and TypeMethodDescriptionbooleanintReturns the (1-based) column number of the start of this range.intReturns the length of the text range.intgetLine()Returns the (1-based) line number of this position.The system ID of the file where the node is located.inthashCode()booleanIf true, column and line numbers are unreliabletoString()static XmlPositionundefinedIn(String systemId) Returns an undefined position in a document identified by the given system ID.
-
Field Details
-
UNDEFINED
-
line
private final int line -
column
private final int column -
length
private final int length -
systemId
-
-
Constructor Details
-
XmlPosition
private XmlPosition(int line, int column) -
XmlPosition
-
XmlPosition
-
-
Method Details
-
getLine
public int getLine()Returns the (1-based) line number of this position. If this position is undefined, the result is garbage. -
getColumn
public int getColumn()Returns the (1-based) column number of the start of this range. If this position is undefined, the result is garbage. -
getLength
public int getLength()Returns the length of the text range. -
getSystemId
-
isUndefined
public boolean isUndefined()If true, column and line numbers are unreliable -
toString
-
equals
-
hashCode
-
undefinedIn
Returns an undefined position in a document identified by the given system ID.- Parameters:
systemId- System ID- Returns:
- An undefined position
-