Package de.hsh.graja.util
Class SourceCodePosition
java.lang.Object
de.hsh.graja.util.SourceCodePosition
- All Implemented Interfaces:
Serializable
A SourceCodePosition contains the position and character length of a code snippet of a single line
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSourceCodePosition
(String filename, int line) SourceCodePosition
(String filename, int line, boolean tabFormatted) SourceCodePosition
(String filename, int line, int position, int length) SourceCodePosition
(String filename, int line, int position, int length, boolean tabFormatted) -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
int
getLine()
int
int
hashCode()
boolean
void
setPosition
(int line, int position, int length) void
toString()
-
Constructor Details
-
SourceCodePosition
-
SourceCodePosition
-
SourceCodePosition
public SourceCodePosition(String filename, int line, int position, int length, boolean tabFormatted) -
SourceCodePosition
-
-
Method Details
-
getFileName
-
getLine
public int getLine() -
getPosition
public int getPosition() -
getLength
public int getLength() -
isTabFormatted
public boolean isTabFormatted()- Returns:
- true, when this position already counted the length of an occurred tab as tabwidth, defined in
Verbatim.TABWIDTH
- false, when this position assumes that an occured tab is 1 character long
- true, when this position already counted the length of an occurred tab as tabwidth, defined in
-
tabFormatted
public void tabFormatted() -
setPosition
public void setPosition(int line, int position, int length) -
toString
-
equals
-
hashCode
public int hashCode()
-