public class NoopCharAppender extends Object implements CharAppender
CharAppender that does nothing. Used by ParserOutput to transparently discard any unwanted input while parsing.ParserOutput,
CharAppender| Modifier and Type | Method and Description |
|---|---|
void |
append(char ch)
Does nothing
|
void |
append(char[] ch)
Does nothing
|
void |
append(char[] ch,
int from,
int length)
Does nothing
|
void |
append(int ch)
Does nothing
|
void |
append(int[] ch)
Does nothing
|
void |
append(Object obj)
Does nothing
|
void |
append(String string)
Does nothing
|
void |
append(String string,
int from,
int to)
Does nothing
|
void |
appendIgnoringPadding(char ch,
char padding)
Does nothing
|
void |
appendIgnoringWhitespace(char ch)
Does nothing
|
void |
appendIgnoringWhitespaceAndPadding(char ch,
char padding)
Does nothing
|
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
|
char |
charAt(int i)
Does nothing
|
void |
fill(char ch,
int length)
Does nothing
|
String |
getAndReset()
Returns null as this appender does nothing.
|
char[] |
getChars()
Does nothing
|
char[] |
getCharsAndReset()
Returns null as this appender does nothing.
|
static CharAppender |
getInstance()
Returns the singleton instance of NoopCharAppender
|
void |
ignore(int count)
Does nothing
|
int |
length()
Returns -1 as this appender does nothing.
|
void |
prepend(char ch)
Does nothing
|
void |
prepend(char[] chars)
Does nothing
|
void |
prepend(char ch1,
char ch2)
Does nothing
|
void |
reset()
Does nothing
|
void |
resetWhitespaceCount()
Does nothing
|
CharSequence |
subSequence(int i,
int i1)
Does nothing
|
void |
updateWhitespace()
Does nothing
|
int |
whitespaceCount()
Returns 0 as this appender does nothing.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitchars, codePoints, toStringpublic static CharAppender getInstance()
public int length()
length in interface CharAppenderlength in interface CharSequencepublic String getAndReset()
getAndReset in interface CharAppenderpublic void appendIgnoringWhitespace(char ch)
appendIgnoringWhitespace in interface CharAppenderch - character to appendpublic void append(char ch)
append in interface CharAppenderch - the character to appendpublic char[] getCharsAndReset()
getCharsAndReset in interface CharAppenderpublic int whitespaceCount()
whitespaceCount in interface CharAppenderpublic void reset()
reset in interface CharAppenderpublic void resetWhitespaceCount()
resetWhitespaceCount in interface CharAppenderpublic char[] getChars()
getChars in interface CharAppenderpublic void fill(char ch,
int length)
fill in interface CharAppenderch - the character to appendlength - the number of times the given character should be appended.public void appendIgnoringPadding(char ch,
char padding)
appendIgnoringPadding in interface CharAppenderch - character to appendpadding - the padding character to ignorepublic void appendIgnoringWhitespaceAndPadding(char ch,
char padding)
appendIgnoringWhitespaceAndPadding in interface CharAppenderch - character to appendpadding - the padding character to ignorepublic void prepend(char ch)
prepend in interface CharAppenderch - the character to prepend in front of the current accumulated value.public void updateWhitespace()
updateWhitespace in interface CharAppenderpublic char appendUntil(char ch,
CharInput input,
char stop)
CharAppenderappendUntil in interface CharAppenderch - the first character of the input to be appended.input - the input whose the following characters will be appendedstop - the stop characterpublic final char appendUntil(char ch,
CharInput input,
char stop1,
char stop2)
CharAppenderappendUntil in interface CharAppenderch - 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 characterpublic final char appendUntil(char ch,
CharInput input,
char stop1,
char stop2,
char stop3)
CharAppenderappendUntil in interface CharAppenderch - 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 characterpublic void append(char[] ch,
int from,
int length)
append in interface CharAppenderch - 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 void prepend(char ch1,
char ch2)
prepend in interface CharAppenderch1 - 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 void prepend(char[] chars)
prepend in interface CharAppenderchars - the character sequence to prepend in front of the current accumulated value.public void append(char[] ch)
append in interface CharAppenderch - the character arraypublic void append(String string)
append in interface CharAppenderstring - the input Stringpublic void append(String string, int from, int to)
append in interface CharAppenderstring - the string whose characters will be appended.from - the index of the first character to appendto - the index of the last character to appendpublic char charAt(int i)
charAt in interface CharSequencepublic CharSequence subSequence(int i, int i1)
subSequence in interface CharSequencepublic void append(int ch)
append in interface CharAppenderch - the codepoint to appendpublic void append(int[] ch)
append in interface CharAppenderch - the codepoint arraypublic void append(Object obj)
append in interface CharAppenderobj - the object whose String representation will be appended.public void ignore(int count)
ignore in interface CharAppendercount - the number of characters to ignoreCopyright © 2018 Univocity Software Pty Ltd. All rights reserved.