|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.univocity.parsers.common.input.DefaultCharAppender
com.univocity.parsers.common.input.ExpandingCharAppender
public class ExpandingCharAppender
An implementation CharAppender that expands the internal buffer of characters as required.
| Constructor Summary | |
|---|---|
ExpandingCharAppender(int initialBufferLength,
String emptyValue,
int whitespaceRangeStart)
Creates an ExpandingCharAppender a the default value to return when no characters have been accumulated. |
|
ExpandingCharAppender(String emptyValue,
int whitespaceRangeStart)
Creates an ExpandingCharAppender a the default value to return when no characters have been accumulated. |
|
| Method Summary | |
|---|---|
void |
append(char ch)
Appends the given character. |
void |
append(char[] ch,
int from,
int length)
Appends characters from an input array |
void |
append(DefaultCharAppender appender)
Appends the contents of another DefaultCharAppender, discarding any of its trailing whitespace characters |
void |
append(String string,
int from,
int to)
Appends the contents of a String to this appender |
void |
appendIgnoringPadding(char ch,
char padding)
Appends the given character and marks it as ignored if it is a padding character (the definition of a padding character is implementation dependent.) |
void |
appendIgnoringWhitespace(char ch)
Appends the given character and marks it as ignored if it is a whitespace ( ch <= ' ') |
void |
appendIgnoringWhitespaceAndPadding(char ch,
char padding)
Appends the given character and marks it as ignored if it is a whitespace ( ch <= ' ') or a padding character (the definition of a padding character is implementation dependent.) |
char |
appendUntil(char ch,
CharInput input,
char stop)
Appends characters from the input, until a stop character is found |
char |
appendUntil(char ch,
CharInput input,
char stop1,
char stop2)
Appends characters from the input, until a stop character is found |
char |
appendUntil(char ch,
CharInput input,
char stop1,
char stop2,
char stop3)
Appends characters from the input, until a stop character is found |
void |
fill(char ch,
int length)
Adds a sequence of repeated characters to the input. |
void |
prepend(char ch)
Prepends the current accumulated value with a character |
void |
prepend(char[] chars)
Prepends the current accumulated value a sequence of characters |
void |
prepend(char ch1,
char ch2)
Prepends the current accumulated value with a couple of characters |
| Methods inherited from class com.univocity.parsers.common.input.DefaultCharAppender |
|---|
append, append, append, append, charAt, getAndReset, getChars, getCharsAndReset, length, reset, resetWhitespaceCount, subSequence, toString, updateWhitespace, whitespaceCount |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ExpandingCharAppender(String emptyValue,
int whitespaceRangeStart)
ExpandingCharAppender a the default value to return when no characters have been accumulated.
The padding character is defaulted to a whitespace character ' '.
emptyValue - default value to return when no characters have been accumulatedwhitespaceRangeStart - starting range of characters considered to be whitespace.
public ExpandingCharAppender(int initialBufferLength,
String emptyValue,
int whitespaceRangeStart)
ExpandingCharAppender a the default value to return when no characters have been accumulated.
The padding character is defaulted to a whitespace character ' '.
initialBufferLength - the initial length of the internal buffer.emptyValue - default value to return when no characters have been accumulatedwhitespaceRangeStart - starting range of characters considered to be whitespace.| Method Detail |
|---|
public void appendIgnoringWhitespace(char ch)
CharAppenderch <= ' ')
appendIgnoringWhitespace in interface CharAppenderappendIgnoringWhitespace in class DefaultCharAppenderch - character to append
public void appendIgnoringPadding(char ch,
char padding)
CharAppender
appendIgnoringPadding in interface CharAppenderappendIgnoringPadding in class DefaultCharAppenderch - character to appendpadding - the padding character to ignore
public void appendIgnoringWhitespaceAndPadding(char ch,
char padding)
CharAppenderch <= ' ') or a padding character (the definition of a padding character is implementation dependent.)
appendIgnoringWhitespaceAndPadding in interface CharAppenderappendIgnoringWhitespaceAndPadding in class DefaultCharAppenderch - character to appendpadding - the padding character to ignorepublic void append(char ch)
CharAppender
append in interface CharAppenderappend in class DefaultCharAppenderch - the character to append
public final void fill(char ch,
int length)
CharAppender
fill in interface CharAppenderfill in class DefaultCharAppenderch - the character to appendlength - the number of times the given character should be appended.public final void prepend(char ch)
DefaultCharAppender
prepend in interface CharAppenderprepend in class DefaultCharAppenderch - the character to prepend in front of the current accumulated value.
public final void prepend(char ch1,
char ch2)
CharAppender
prepend in interface CharAppenderprepend in class DefaultCharAppenderch1 - the first character to prepend in front of the current accumulated value.ch2 - the second character to prepend in front of the current accumulated value.public final void prepend(char[] chars)
CharAppender
prepend in interface CharAppenderprepend in class DefaultCharAppenderchars - the character sequence to prepend in front of the current accumulated value.public final void append(DefaultCharAppender appender)
DefaultCharAppender
append in class DefaultCharAppenderappender - The DefaultCharAppender instance got get contents from.
public final char appendUntil(char ch,
CharInput input,
char stop)
CharAppender
appendUntil in interface CharAppenderappendUntil in class DefaultCharAppenderch - the first character of the input to be appended.input - the input whose the following characters will be appendedstop - the stop character
public final char appendUntil(char ch,
CharInput input,
char stop1,
char stop2)
CharAppender
appendUntil in interface CharAppenderappendUntil in class DefaultCharAppenderch - the first character of the input to be appended.input - the input whose the following characters will be appendedstop1 - the first stop characterstop2 - the second stop character
public final char appendUntil(char ch,
CharInput input,
char stop1,
char stop2,
char stop3)
CharAppender
appendUntil in interface CharAppenderappendUntil in class DefaultCharAppenderch - the first character of the input to be appended.input - the input whose the following characters will be appendedstop1 - the first stop characterstop2 - the second stop characterstop3 - the third stop character
public final void append(char[] ch,
int from,
int length)
CharAppender
append in interface CharAppenderappend in class DefaultCharAppenderch - the character arrayfrom - the position of the first character in the array to be appendedlength - the number of characters to be appended from the given posiion.
public final void append(String string,
int from,
int to)
CharAppender
append in interface CharAppenderappend in class DefaultCharAppenderstring - the string whose characters will be appended.from - the index of the first character to appendto - the index of the last character to append
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||