public abstract class CharacterSeparatedList
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected static char |
CR
Carriage Return character.
|
protected java.lang.String |
currentString
Current string being parsed.
|
protected static char |
HT
Horizontal TAB character.
|
protected static char |
LF
Line feed character.
|
protected char |
separator
Characters separator.
|
protected static char |
SP
Space character.
|
| Constructor and Description |
|---|
CharacterSeparatedList(char separator)
Creates a new instance of
CharacterSeparatedList using the character separator as the
separator character. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
endParse()
End instructions of the string parsing.
|
protected abstract java.lang.StringBuilder |
generate(java.lang.StringBuilder sb)
Generates a String representation.
|
protected abstract void |
initializeNbTokens(int nbTokens)
Set the number of tokens to read.
|
protected abstract void |
newToken(int id,
int start,
int stop)
Read a new token between the given start and stop index and set its id.
|
void |
parse(java.lang.String str)
Parses the given
String. |
void |
parse(java.lang.String str,
int start,
int stop)
Parses the
String str from the start index to the stop index. |
protected static final char CR
protected static final char HT
protected static final char LF
protected static final char SP
@Nullable protected java.lang.String currentString
protected char separator
public CharacterSeparatedList(char separator)
CharacterSeparatedList using the character separator as the
separator character.separator - the character to treat as characters separator for this listprotected void endParse()
protected abstract java.lang.StringBuilder generate(java.lang.StringBuilder sb)
sb - the StringBufferStringBufferprotected abstract void initializeNbTokens(int nbTokens)
nbTokens - number of tokensprotected abstract void newToken(int id,
int start,
int stop)
id - for the tokenstart - index of the token begin in the stringstop - index of the token end in the stringpublic void parse(java.lang.String str)
String.str - the String to parsepublic void parse(@Nullable
java.lang.String str,
int start,
int stop)
String str from the start index to the stop index.str - the String to parsestart - the start indexstop - the stop index