public boolean equals(Object obj) {
    if (obj == null || getClass() != obj.getClass()) return false;
    TextPosition other = (TextPosition)obj;
    return line == other.line && column == other.column;
  }
Creates a new TextPosition instance.

@param line the position's line number
@param column the position's column number
@throws IllegalArgumentException if line or column is less than 1
spock-core/src/main/java/org/spockframework/runtime/model/TextPosition.java