Package org.spockframework.runtime.model
Class TextPosition
java.lang.Object
org.spockframework.runtime.model.TextPosition
- All Implemented Interfaces:
Comparable<TextPosition>
A position in a text, given as a line/column pair. The first character in the
text has position (1,1). TextPosition instances are immutable.
- Author:
- Peter Niederwieser
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(TextPosition other) static TextPositioncreate(int line, int column) static TextPositionendOf(org.codehaus.groovy.ast.ASTNode node) booleanintintintgetLine()intinthashCode()shiftVertically(int numLines) static TextPositionstartOf(org.codehaus.groovy.ast.ASTNode node) static TextPositionstartOf(org.codehaus.groovy.syntax.Token token) toString()
-
Field Details
-
NOT_AVAILABLE
-
-
Method Details
-
getLine
public int getLine() -
getColumn
public int getColumn() -
getLineIndex
public int getLineIndex() -
getColumnIndex
public int getColumnIndex() -
shiftVertically
-
equals
-
hashCode
public int hashCode() -
toString
-
compareTo
- Specified by:
compareToin interfaceComparable<TextPosition>
-
startOf
-
startOf
-
endOf
-
create
-