@API(status=STABLE, since="1.0") public class FilePosition extends Object implements Serializable
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
static FilePosition |
from(int line)
Create a new
FilePosition using the supplied line number
and an undefined column number. |
static FilePosition |
from(int line,
int column)
Create a new
FilePosition using the supplied line and
column numbers. |
Optional<Integer> |
getColumn()
Get the column number of this
FilePosition , if available. |
int |
getLine()
Get the line number of this
FilePosition . |
int |
hashCode() |
String |
toString() |
public static FilePosition from(int line)
FilePosition
using the supplied line
number
and an undefined column number.line
- the line number; must be greater than zeropublic static FilePosition from(int line, int column)
FilePosition
using the supplied line
and
column
numbers.line
- the line number; must be greater than zerocolumn
- the column number; must be greater than zeropublic int getLine()
FilePosition
.public Optional<Integer> getColumn()
FilePosition
, if available.Optional
containing the column number; never
null
but potentially empty