@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. |
static Optional<FilePosition> |
fromQuery(String query)
Create an optional
FilePosition by parsing the supplied
query string. |
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 zeroFilePosition with the given line numberpublic 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 zeroFilePosition with the given line and column numberspublic static Optional<FilePosition> fromQuery(String query)
FilePosition by parsing the supplied
query string.
Examples of valid query strings:
"line=23""line=23&column=42"query - the query string; may be nullOptional containing a FilePosition with
the parsed line and column numbers; never null but potentially
emptyfrom(int),
from(int, int)public int getLine()
FilePosition.public Optional<Integer> getColumn()
FilePosition, if available.Optional containing the column number; never
null but potentially emptyCopyright © 2024. All rights reserved.