Class FilePosition
- java.lang.Object
-
- org.junit.platform.engine.support.descriptor.FilePosition
-
- All Implemented Interfaces:
Serializable
@API(status=STABLE, since="1.0") public class FilePosition extends Object implements Serializable
- Since:
- 1.0
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)static FilePositionfrom(int line)Create a newFilePositionusing the suppliedlinenumber and an undefined column number.static FilePositionfrom(int line, int column)Create a newFilePositionusing the suppliedlineandcolumnnumbers.Optional<Integer>getColumn()Get the column number of thisFilePosition, if available.intgetLine()Get the line number of thisFilePosition.inthashCode()StringtoString()
-
-
-
Method Detail
-
from
public static FilePosition from(int line)
Create a newFilePositionusing the suppliedlinenumber and an undefined column number.- Parameters:
line- the line number; must be greater than zero
-
from
public static FilePosition from(int line, int column)
Create a newFilePositionusing the suppliedlineandcolumnnumbers.- Parameters:
line- the line number; must be greater than zerocolumn- the column number; must be greater than zero
-
getLine
public int getLine()
Get the line number of thisFilePosition.- Returns:
- the line number
-
getColumn
public Optional<Integer> getColumn()
Get the column number of thisFilePosition, if available.- Returns:
- an
Optionalcontaining the column number; nevernullbut potentially empty
-
-