public class Line extends Object
It also provides methods for processing and analyzing a line.
| Modifier and Type | Field and Description |
|---|---|
boolean |
isEmpty
Is this line empty?
|
int |
leading
Leading and trailing spaces.
|
Line |
next
Previous and next line.
|
boolean |
nextEmpty
Is previous/next line empty?
|
int |
pos
Current cursor position.
|
boolean |
prevEmpty
Is previous/next line empty?
|
Line |
previous
Previous and next line.
|
int |
trailing
Leading and trailing spaces.
|
String |
value
This line's value.
|
Line |
xmlEndLine
Final line of a XML block.
|
| Constructor and Description |
|---|
Line()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
com.github.rjeschke.txtmark.LineType |
getLineType(Configuration configuration)
Gets this line's type.
|
void |
init()
Calculates leading and trailing spaces.
|
void |
initLeading()
Recalculate leading spaces.
|
String |
readUntil(char... end)
Reads chars from this line until any 'end' char is reached.
|
void |
setEmpty()
Marks this line empty.
|
boolean |
skipSpaces()
Skips spaces.
|
String |
stripID()
Checks if this line contains an ID at it's end and removes it from the
line.
|
public int pos
public int leading
public int trailing
public boolean isEmpty
public String value
public Line previous
public Line next
public boolean prevEmpty
public boolean nextEmpty
public Line xmlEndLine
public void init()
public void initLeading()
public boolean skipSpaces()
false if end of line is reachedpublic String readUntil(char... end)
end - Delimiting character(s)null if no 'end' char was
reached.public void setEmpty()
public com.github.rjeschke.txtmark.LineType getLineType(Configuration configuration)
configuration - txtmark configurationpublic String stripID()
null if no valid ID exists.Copyright © 2016. All Rights Reserved.