public class ElasticCharAppender extends ExpandingCharAppender
| Constructor and Description |
|---|
ElasticCharAppender(int defaultLength,
String emptyValue) |
ElasticCharAppender(String emptyValue) |
| Modifier and Type | Method and Description |
|---|---|
String |
getAndReset()
Returns the accumulated value as a String, discarding any trailing whitespace characters identified when using
DefaultCharAppender.appendIgnoringWhitespace(char), DefaultCharAppender.appendIgnoringPadding(char, char) or DefaultCharAppender.appendIgnoringWhitespaceAndPadding(char, char) |
char[] |
getCharsAndReset()
Returns the accumulated characters, discarding any trailing whitespace characters identified when using
DefaultCharAppender.appendIgnoringWhitespace(char), DefaultCharAppender.appendIgnoringPadding(char, char) or DefaultCharAppender.appendIgnoringWhitespaceAndPadding(char, char) |
char[] |
getTrimmedCharsAndReset() |
String |
getTrimmedStringAndReset() |
void |
reset()
Clears the accumulated value and the whitespace count.
|
append, append, append, append, appendIgnoringPadding, appendIgnoringWhitespace, appendIgnoringWhitespaceAndPadding, appendUntil, appendUntil, appendUntil, fill, prepend, prepend, prependappend, append, append, append, append, charAt, delete, getChars, ignore, indexOf, indexOf, indexOf, indexOfAny, isEmpty, lastIndexOf, length, remove, resetWhitespaceCount, subSequence, substring, toString, updateWhitespace, whitespaceCountclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitchars, codePointspublic ElasticCharAppender(String emptyValue)
public ElasticCharAppender(int defaultLength,
String emptyValue)
public String getAndReset()
DefaultCharAppenderDefaultCharAppender.appendIgnoringWhitespace(char), DefaultCharAppender.appendIgnoringPadding(char, char) or DefaultCharAppender.appendIgnoringWhitespaceAndPadding(char, char)
The internal accumulated value is discarded after invoking this method (as in DefaultCharAppender.reset())
If the accumulated value is empty (i.e. no characters were appended, or all appended characters where ignored as whitespace or padding), then the return value will be DefaultCharAppender.emptyValue attribute defined in the constructor of this class.
getAndReset in interface CharAppendergetAndReset in class DefaultCharAppenderDefaultCharAppender.emptyValue defined in the constructor of this class.public char[] getCharsAndReset()
DefaultCharAppenderDefaultCharAppender.appendIgnoringWhitespace(char), DefaultCharAppender.appendIgnoringPadding(char, char) or DefaultCharAppender.appendIgnoringWhitespaceAndPadding(char, char)
The internal accumulated value is discarded after invoking this method (as in DefaultCharAppender.reset())
If the accumulated value is empty (i.e. no characters were appended, or all appended characters where ignored as whitespace or padding), then the return value will be character sequence of the DefaultCharAppender.emptyValue attribute defined in the constructor of this class.
getCharsAndReset in interface CharAppendergetCharsAndReset in class DefaultCharAppenderDefaultCharAppender.emptyValue defined in the constructor of this class.public void reset()
CharAppenderreset in interface CharAppenderreset in class DefaultCharAppenderpublic String getTrimmedStringAndReset()
public char[] getTrimmedCharsAndReset()
Copyright © 2021 Univocity Software Pty Ltd. All rights reserved.