java.lang.Object
org.csveed.token.SymbolMapping
The Class SymbolMapping.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMapping(EncounteredSymbol symbol, char[] characters) Adds the mapping.voidaddMapping(EncounteredSymbol symbol, Character character) Adds the mapping.find(int character, ParseState parseState) Find.chargetFirstMappedCharacter(EncounteredSymbol encounteredSymbol) Gets the first mapped character.char[]getMappedCharacters(EncounteredSymbol encounteredSymbol) Gets the mapped characters.intGets the start line.voidInits the default mapping.booleanChecks if is same characters for escape and quote.booleanChecks if is skip comment lines.voidLog settings.voidsetSkipCommentLines(boolean skipCommentLines) Sets the skip comment lines.voidsetStartLine(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
-