java.lang.Object
org.csveed.token.SymbolMapping
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addMapping
(EncounteredSymbol symbol, char[] characters) Adds the mapping.void
addMapping
(EncounteredSymbol symbol, Character character) Adds the mapping.find
(int character, ParseState parseState) Find.char
getFirstMappedCharacter
(EncounteredSymbol encounteredSymbol) Gets the first mapped character.char[]
getMappedCharacters
(EncounteredSymbol encounteredSymbol) Gets the mapped characters.int
Gets the start line.void
Inits the default mapping.boolean
Checks if is same characters for escape and quote.boolean
Checks if is skip comment lines.void
Log settings.void
setSkipCommentLines
(boolean skipCommentLines) Sets the skip comment lines.void
setStartLine
(int startLine) Sets the start line.
-
Constructor Details
-
SymbolMapping
public SymbolMapping()Instantiates a new symbol mapping.
-
-
Method Details
-
initDefaultMapping
public void initDefaultMapping()Inits the default mapping. -
getFirstMappedCharacter
Gets the first mapped character.- Parameters:
encounteredSymbol
- the encountered symbol- Returns:
- the first mapped character
-
getMappedCharacters
Gets the mapped characters.- Parameters:
encounteredSymbol
- the encountered symbol- Returns:
- the mapped characters
-
addMapping
Adds the mapping.- Parameters:
symbol
- the symbolcharacter
- the character
-
addMapping
Adds the mapping.- Parameters:
symbol
- the symbolcharacters
- the characters
-
logSettings
public void logSettings()Log settings. -
isSameCharactersForEscapeAndQuote
public boolean isSameCharactersForEscapeAndQuote()Checks if is same characters for escape and quote.- Returns:
- true, if is same characters for escape and quote
-
find
Find.- Parameters:
character
- the characterparseState
- the parse state- Returns:
- the encountered symbol
-
getStartLine
public int getStartLine()Gets the start line.- Returns:
- the start line
-
setStartLine
public void setStartLine(int startLine) Sets the start line.- Parameters:
startLine
- the new start line
-
isSkipCommentLines
public boolean isSkipCommentLines()Checks if is skip comment lines.- Returns:
- true, if is skip comment lines
-
setSkipCommentLines
public void setSkipCommentLines(boolean skipCommentLines) Sets the skip comment lines.- Parameters:
skipCommentLines
- the new skip comment lines
-