com.android.utils
Class PositionXmlParser.DefaultPosition

java.lang.Object
  extended by com.android.utils.PositionXmlParser.DefaultPosition
All Implemented Interfaces:
PositionXmlParser.Position
Enclosing class:
PositionXmlParser

protected static class PositionXmlParser.DefaultPosition
extends java.lang.Object
implements PositionXmlParser.Position


Constructor Summary
PositionXmlParser.DefaultPosition(int line, int column, int offset)
          Creates a new PositionXmlParser.Position
 
Method Summary
 int getColumn()
           
 PositionXmlParser.Position getEnd()
          Linked position: for a begin position this will point to the corresponding end position.
 int getLine()
           
 int getOffset()
           
 void setEnd(PositionXmlParser.Position end)
          Linked position: for a begin position this will point to the corresponding end position.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PositionXmlParser.DefaultPosition

public PositionXmlParser.DefaultPosition(int line,
                                         int column,
                                         int offset)
Creates a new PositionXmlParser.Position

Parameters:
line - the 0-based line number, or -1 if unknown
column - the 0-based column number, or -1 if unknown
offset - the offset, or -1 if unknown
Method Detail

getLine

public int getLine()
Specified by:
getLine in interface PositionXmlParser.Position
Returns:
the line number, 0-based

getOffset

public int getOffset()
Specified by:
getOffset in interface PositionXmlParser.Position
Returns:
the offset number, 0-based

getColumn

public int getColumn()
Specified by:
getColumn in interface PositionXmlParser.Position
Returns:
the column number, 0-based, and -1 if the column number if not known

getEnd

public PositionXmlParser.Position getEnd()
Description copied from interface: PositionXmlParser.Position
Linked position: for a begin position this will point to the corresponding end position. For an end position this will be null.

Specified by:
getEnd in interface PositionXmlParser.Position
Returns:
the end position, or null

setEnd

public void setEnd(@NonNull
                   PositionXmlParser.Position end)
Description copied from interface: PositionXmlParser.Position
Linked position: for a begin position this will point to the corresponding end position. For an end position this will be null.

Specified by:
setEnd in interface PositionXmlParser.Position
Parameters:
end - the end position