Package org.tomlj
Class TomlPosition
- java.lang.Object
-
- org.tomlj.TomlPosition
-
public final class TomlPosition extends java.lang.Object
A position in an input document.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
TomlPosition(int line, int column)
(package private)
TomlPosition(org.antlr.v4.runtime.ParserRuleContext ctx)
(package private)
TomlPosition(org.antlr.v4.runtime.ParserRuleContext ctx, int offset)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
column()
The column number.boolean
equals(java.lang.Object obj)
int
hashCode()
int
line()
The line number.static TomlPosition
positionAt(int line, int column)
Create a position.java.lang.String
toString()
-
-
-
Method Detail
-
positionAt
public static TomlPosition positionAt(int line, int column)
Create a position.- Parameters:
line
- The line.column
- The column.- Returns:
- A position.
-
line
public int line()
The line number.The first line of the document is line 1.
- Returns:
- The line number (1..).
-
column
public int column()
The column number.The first column of the document is column 1.
- Returns:
- The column number (1..).
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-