Top Description Fields Constructors Methods
com.univocity.parsers.common.input

public Class NoopCharAppender

extends Object
implements CharAppender
Class Inheritance
All Implemented Interfaces
com.univocity.parsers.common.input.CharAppender, java.lang.CharSequence
Imports
com.univocity.parsers.common.*

An implementation of CharAppender that does nothing. Used by ParserOutput to transparently discard any unwanted input while parsing.
Author
Univocity Software Pty Ltd - [email protected]
See Also
com.univocity.parsers.common.ParserOutput, com.univocity.parsers.common.input.CharAppender

Field Summary

Modifier and TypeField and Description
private static final NoopCharAppender

Constructor Summary

AccessConstructor and Description
private
NoopCharAppender()

This is a singleton class and cannot be instantiated.

Method Summary

Modifier and TypeMethod and Description
public void
append(char
the character to append
ch
)

Implements com.univocity.parsers.common.input.CharAppender.append.

Does nothing
public void
append(char[]
the character array
ch
,
int
the position of the first character in the array to be appended
from
,
int
the number of characters to be appended from the given posiion.
length
)

Implements com.univocity.parsers.common.input.CharAppender.append.

Does nothing
public void
append(char[]
the character array
ch
)

Implements com.univocity.parsers.common.input.CharAppender.append.

Does nothing
public void
append(String
the input String
string
)

Implements com.univocity.parsers.common.input.CharAppender.append.

Does nothing
public void
append(String
the string whose characters will be appended.
string
,
int
the index of the first character to append
from
,
int
the index of the last character to append
to
)

Implements com.univocity.parsers.common.input.CharAppender.append.

Does nothing
public void
append(int
the codepoint to append
ch
)

Implements com.univocity.parsers.common.input.CharAppender.append.

Does nothing
public void
append(int[]
the codepoint array
ch
)

Implements com.univocity.parsers.common.input.CharAppender.append.

Does nothing
public void
append(Object
the object whose String representation will be appended.
obj
)

Implements com.univocity.parsers.common.input.CharAppender.append.

Does nothing
public void
appendIgnoringPadding(char
character to append
ch
,
char
the padding character to ignore
padding
)

Implements com.univocity.parsers.common.input.CharAppender.appendIgnoringPadding.

Does nothing
public void
public void
appendIgnoringWhitespaceAndPadding(char
character to append
ch
,
char
the padding character to ignore
padding
)

Implements com.univocity.parsers.common.input.CharAppender.appendIgnoringWhitespaceAndPadding.

Does nothing
public char
appendUntil(char
the first character of the input to be appended.
ch
,
CharInput
the input whose the following characters will be appended
input
,
char
the stop character
stop
)

Implements com.univocity.parsers.common.input.CharAppender.appendUntil.

Appends characters from the input, until a stop character is found
public final char
appendUntil(char
the first character of the input to be appended.
ch
,
CharInput
the input whose the following characters will be appended
input
,
char
the first stop character
stop1
,
char
the second stop character
stop2
)

Implements com.univocity.parsers.common.input.CharAppender.appendUntil.

Appends characters from the input, until a stop character is found
public final char
appendUntil(char
the first character of the input to be appended.
ch
,
CharInput
the input whose the following characters will be appended
input
,
char
the first stop character
stop1
,
char
the second stop character
stop2
,
char
the third stop character
stop3
)

Implements com.univocity.parsers.common.input.CharAppender.appendUntil.

Appends characters from the input, until a stop character is found
public char
charAt(int
the index of the char value to be returned
i
)

Implements java.lang.CharSequence.charAt.

Does nothing
public void
delete(int
the number of characters to delete.
count
)

Implements com.univocity.parsers.common.input.CharAppender.delete.

Does nothing
public void
fill(char
the character to append
ch
,
int
the number of times the given character should be appended.
length
)

Implements com.univocity.parsers.common.input.CharAppender.fill.

Does nothing
public String

Returns:

null as this appender does nothing.
getAndReset
()

Implements com.univocity.parsers.common.input.CharAppender.getAndReset.

Returns null as this appender does nothing.
public char[]
public char[]

Returns:

null as this appender does nothing.
getCharsAndReset
()

Implements com.univocity.parsers.common.input.CharAppender.getCharsAndReset.

Returns null as this appender does nothing.
public static CharAppender

Returns:

the singleton instance of NoopCharAppender
getInstance
()

Returns the singleton instance of NoopCharAppender

public void
ignore(int
the number of characters to ignore
count
)

Implements com.univocity.parsers.common.input.CharAppender.ignore.

Does nothing
public int
indexOf(char
the character to look for
ch
,
int
the starting index from where the search will begin.
from
)

Implements com.univocity.parsers.common.input.CharAppender.indexOf.

Does nothing
public int
indexOf(char[]
the character sequence to look for
charSequence
,
int
the starting index from where the search will begin.
from
)

Implements com.univocity.parsers.common.input.CharAppender.indexOf.

Does nothing
public int
indexOf(CharSequence
the character sequence to look for
charSequence
,
int
the starting index from where the search will begin.
from
)

Implements com.univocity.parsers.common.input.CharAppender.indexOf.

Does nothing
public int
indexOfAny(char[]
the characters to look for
chars
,
int
the starting index from where the search will begin.
from
)

Implements com.univocity.parsers.common.input.CharAppender.indexOfAny.

Does nothing
public boolean
isEmpty()

Implements com.univocity.parsers.common.input.CharAppender.isEmpty.

Returns true as it's always empty.
public int
lastIndexOf(char
the character to look for
ch
)

Implements com.univocity.parsers.common.input.CharAppender.lastIndexOf.

Returns the last index of a given character in the current appended (characters that have been marked as whitespace will be ignored)
public int

Returns:

-1 as this appender does nothing.
length
()

Implements com.univocity.parsers.common.input.CharAppender.length.

Returns -1 as this appender does nothing.
public void
prepend(char
the character to prepend in front of the current accumulated value.
ch
)

Implements com.univocity.parsers.common.input.CharAppender.prepend.

Does nothing
public void
prepend(char
the first character to prepend in front of the current accumulated value.
ch1
,
char
the second character to prepend in front of the current accumulated value.
ch2
)

Implements com.univocity.parsers.common.input.CharAppender.prepend.

Does nothing
public void
prepend(char[]
the character sequence to prepend in front of the current accumulated value.
chars
)

Implements com.univocity.parsers.common.input.CharAppender.prepend.

Does nothing
public void
remove(int
the starting position in the buffer (inclusive)
from
,
int
the number of characters to accumulate from the given start position
length
)

Implements com.univocity.parsers.common.input.CharAppender.remove.

Does nothing
public void
public void
public CharSequence
subSequence(int
the start index, inclusive
i
,
int
the end index, exclusive
i1
)

Implements java.lang.CharSequence.subSequence.

Does nothing
public String
substring(int
the starting position in the buffer
from
,
int
the number of characters to accumulate from the given start position
length
)

Implements com.univocity.parsers.common.input.CharAppender.substring.

Does nothing
public void
public int

Returns:

0 as this appender does nothing.
whitespaceCount
()

Implements com.univocity.parsers.common.input.CharAppender.whitespaceCount.

Returns 0 as this appender does nothing.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

instanceback to summary
private static final NoopCharAppender instance

Constructor Detail

NoopCharAppenderback to summary
private NoopCharAppender()

This is a singleton class and cannot be instantiated. Use NoopCharAppender#getInstance().

Method Detail

appendback to summary
public void append(char ch)

Implements com.univocity.parsers.common.input.CharAppender.append.

Does nothing

Parameters
ch:char

Doc from com.univocity.parsers.common.input.CharAppender.append.

the character to append

Annotations
@Override
appendback to summary
public void append(char[] ch, int from, int length)

Implements com.univocity.parsers.common.input.CharAppender.append.

Does nothing

Parameters
ch:char[]

Doc from com.univocity.parsers.common.input.CharAppender.append.

the character array

from:int

Doc from com.univocity.parsers.common.input.CharAppender.append.

the position of the first character in the array to be appended

length:int

Doc from com.univocity.parsers.common.input.CharAppender.append.

the number of characters to be appended from the given posiion.

Annotations
@Override
appendback to summary
public void append(char[] ch)

Implements com.univocity.parsers.common.input.CharAppender.append.

Does nothing

Parameters
ch:char[]

Doc from com.univocity.parsers.common.input.CharAppender.append.

the character array

Annotations
@Override
appendback to summary
public void append(String string)

Implements com.univocity.parsers.common.input.CharAppender.append.

Does nothing

Parameters
string:String

Doc from com.univocity.parsers.common.input.CharAppender.append.

the input String

Annotations
@Override
appendback to summary
public void append(String string, int from, int to)

Implements com.univocity.parsers.common.input.CharAppender.append.

Does nothing

Parameters
string:String

Doc from com.univocity.parsers.common.input.CharAppender.append.

the string whose characters will be appended.

from:int

Doc from com.univocity.parsers.common.input.CharAppender.append.

the index of the first character to append

to:int

Doc from com.univocity.parsers.common.input.CharAppender.append.

the index of the last character to append

Annotations
@Override
appendback to summary
public void append(int ch)

Implements com.univocity.parsers.common.input.CharAppender.append.

Does nothing

Parameters
ch:int

Doc from com.univocity.parsers.common.input.CharAppender.append.

the codepoint to append

Annotations
@Override
appendback to summary
public void append(int[] ch)

Implements com.univocity.parsers.common.input.CharAppender.append.

Does nothing

Parameters
ch:int[]

Doc from com.univocity.parsers.common.input.CharAppender.append.

the codepoint array

Annotations
@Override
appendback to summary
public void append(Object obj)

Implements com.univocity.parsers.common.input.CharAppender.append.

Does nothing

Parameters
obj:Object

Doc from com.univocity.parsers.common.input.CharAppender.append.

the object whose String representation will be appended.

Annotations
@Override
appendIgnoringPaddingback to summary
public void appendIgnoringPadding(char ch, char padding)

Implements com.univocity.parsers.common.input.CharAppender.appendIgnoringPadding.

Does nothing

Parameters
ch:char

Doc from com.univocity.parsers.common.input.CharAppender.appendIgnoringPadding.

character to append

padding:char

Doc from com.univocity.parsers.common.input.CharAppender.appendIgnoringPadding.

the padding character to ignore

Annotations
@Override
appendIgnoringWhitespaceback to summary
public void appendIgnoringWhitespace(char ch)

Implements com.univocity.parsers.common.input.CharAppender.appendIgnoringWhitespace.

Does nothing

Parameters
ch:char

Doc from com.univocity.parsers.common.input.CharAppender.appendIgnoringWhitespace.

character to append

Annotations
@Override
appendIgnoringWhitespaceAndPaddingback to summary
public void appendIgnoringWhitespaceAndPadding(char ch, char padding)

Implements com.univocity.parsers.common.input.CharAppender.appendIgnoringWhitespaceAndPadding.

Does nothing

Parameters
ch:char

Doc from com.univocity.parsers.common.input.CharAppender.appendIgnoringWhitespaceAndPadding.

character to append

padding:char

Doc from com.univocity.parsers.common.input.CharAppender.appendIgnoringWhitespaceAndPadding.

the padding character to ignore

Annotations
@Override
appendUntilback to summary
public char appendUntil(char ch, CharInput input, char stop)

Implements com.univocity.parsers.common.input.CharAppender.appendUntil.

Doc from com.univocity.parsers.common.input.CharAppender.appendUntil.

Appends characters from the input, until a stop character is found

Parameters
ch:char

the first character of the input to be appended.

input:CharInput

the input whose the following characters will be appended

stop:char

the stop character

Returns:char

the stop character found on the input.

Annotations
@Override
appendUntilback to summary
public final char appendUntil(char ch, CharInput input, char stop1, char stop2)

Implements com.univocity.parsers.common.input.CharAppender.appendUntil.

Doc from com.univocity.parsers.common.input.CharAppender.appendUntil.

Appends characters from the input, until a stop character is found

Parameters
ch:char

the first character of the input to be appended.

input:CharInput

the input whose the following characters will be appended

stop1:char

the first stop character

stop2:char

the second stop character

Returns:char

one of the stop characters found on the input.

Annotations
@Override
appendUntilback to summary
public final char appendUntil(char ch, CharInput input, char stop1, char stop2, char stop3)

Implements com.univocity.parsers.common.input.CharAppender.appendUntil.

Doc from com.univocity.parsers.common.input.CharAppender.appendUntil.

Appends characters from the input, until a stop character is found

Parameters
ch:char

the first character of the input to be appended.

input:CharInput

the input whose the following characters will be appended

stop1:char

the first stop character

stop2:char

the second stop character

stop3:char

the third stop character

Returns:char

one of the stop characters found on the input.

Annotations
@Override
charAtback to summary
public char charAt(int i)

Implements java.lang.CharSequence.charAt.

Does nothing

Parameters
i:int

Doc from java.lang.CharSequence.charAt.

the index of the char value to be returned

Returns:char

Doc from java.lang.CharSequence.charAt.

the specified char value

Annotations
@Override
deleteback to summary
public void delete(int count)

Implements com.univocity.parsers.common.input.CharAppender.delete.

Does nothing

Parameters
count:int

Doc from com.univocity.parsers.common.input.CharAppender.delete.

the number of characters to delete.

Annotations
@Override
fillback to summary
public void fill(char ch, int length)

Implements com.univocity.parsers.common.input.CharAppender.fill.

Does nothing

Parameters
ch:char

Doc from com.univocity.parsers.common.input.CharAppender.fill.

the character to append

length:int

Doc from com.univocity.parsers.common.input.CharAppender.fill.

the number of times the given character should be appended.

Annotations
@Override
getAndResetback to summary
public String getAndReset()

Implements com.univocity.parsers.common.input.CharAppender.getAndReset.

Returns null as this appender does nothing.

Returns:String

null as this appender does nothing.

Annotations
@Override
getCharsback to summary
public char[] getChars()

Implements com.univocity.parsers.common.input.CharAppender.getChars.

Does nothing

Returns:char[]

Doc from com.univocity.parsers.common.input.CharAppender.getChars.

the internal character array.

Annotations
@Override
getCharsAndResetback to summary
public char[] getCharsAndReset()

Implements com.univocity.parsers.common.input.CharAppender.getCharsAndReset.

Returns null as this appender does nothing.

Returns:char[]

null as this appender does nothing.

Annotations
@Override
getInstanceback to summary
public static CharAppender getInstance()

Returns the singleton instance of NoopCharAppender

Returns:CharAppender

the singleton instance of NoopCharAppender

ignoreback to summary
public void ignore(int count)

Implements com.univocity.parsers.common.input.CharAppender.ignore.

Does nothing

Parameters
count:int

Doc from com.univocity.parsers.common.input.CharAppender.ignore.

the number of characters to ignore

Annotations
@Override
indexOfback to summary
public int indexOf(char ch, int from)

Implements com.univocity.parsers.common.input.CharAppender.indexOf.

Does nothing

Parameters
ch:char

Doc from com.univocity.parsers.common.input.CharAppender.indexOf.

the character to look for

from:int

Doc from com.univocity.parsers.common.input.CharAppender.indexOf.

the starting index from where the search will begin.

Returns:int

Doc from com.univocity.parsers.common.input.CharAppender.indexOf.

the position of the given character in the appended content, -1 if not found

Annotations
@Override
indexOfback to summary
public int indexOf(char[] charSequence, int from)

Implements com.univocity.parsers.common.input.CharAppender.indexOf.

Does nothing

Parameters
charSequence:char[]

Doc from com.univocity.parsers.common.input.CharAppender.indexOf.

the character sequence to look for

from:int

Doc from com.univocity.parsers.common.input.CharAppender.indexOf.

the starting index from where the search will begin.

Returns:int

Doc from com.univocity.parsers.common.input.CharAppender.indexOf.

the position of the given character sequence in the appended content, -1 if not found

Annotations
@Override
indexOfback to summary
public int indexOf(CharSequence charSequence, int from)

Implements com.univocity.parsers.common.input.CharAppender.indexOf.

Does nothing

Parameters
charSequence:CharSequence

Doc from com.univocity.parsers.common.input.CharAppender.indexOf.

the character sequence to look for

from:int

Doc from com.univocity.parsers.common.input.CharAppender.indexOf.

the starting index from where the search will begin.

Returns:int

Doc from com.univocity.parsers.common.input.CharAppender.indexOf.

the position of the given character sequence in the appended content, -1 if not found

Annotations
@Override
indexOfAnyback to summary
public int indexOfAny(char[] chars, int from)

Implements com.univocity.parsers.common.input.CharAppender.indexOfAny.

Does nothing

Parameters
chars:char[]

Doc from com.univocity.parsers.common.input.CharAppender.indexOfAny.

the characters to look for

from:int

Doc from com.univocity.parsers.common.input.CharAppender.indexOfAny.

the starting index from where the search will begin.

Returns:int

Doc from com.univocity.parsers.common.input.CharAppender.indexOfAny.

the position any one of the given characters in the appended content, -1 if none found

Annotations
@Override
isEmptyback to summary
public boolean isEmpty()

Implements com.univocity.parsers.common.input.CharAppender.isEmpty.

Returns true as it's always empty.

Returns:boolean

Doc from com.univocity.parsers.common.input.CharAppender.isEmpty.

true calling getAndReset() would return null, otherwise false.

Annotations
@Override
lastIndexOfback to summary
public int lastIndexOf(char ch)

Implements com.univocity.parsers.common.input.CharAppender.lastIndexOf.

Doc from com.univocity.parsers.common.input.CharAppender.lastIndexOf.

Returns the last index of a given character in the current appended (characters that have been marked as whitespace will be ignored)

Parameters
ch:char

the character to look for

Returns:int

the last position of the given character in the appended content, or -1 if not found.

Annotations
@Override
lengthback to summary
public int length()

Implements com.univocity.parsers.common.input.CharAppender.length.

Returns -1 as this appender does nothing.

Returns:int

-1 as this appender does nothing.

Annotations
@Override
prependback to summary
public void prepend(char ch)

Implements com.univocity.parsers.common.input.CharAppender.prepend.

Does nothing

Parameters
ch:char

Doc from com.univocity.parsers.common.input.CharAppender.prepend.

the character to prepend in front of the current accumulated value.

Annotations
@Override
prependback to summary
public void prepend(char ch1, char ch2)

Implements com.univocity.parsers.common.input.CharAppender.prepend.

Does nothing

Parameters
ch1:char

Doc from com.univocity.parsers.common.input.CharAppender.prepend.

the first character to prepend in front of the current accumulated value.

ch2:char

Doc from com.univocity.parsers.common.input.CharAppender.prepend.

the second character to prepend in front of the current accumulated value.

Annotations
@Override
prependback to summary
public void prepend(char[] chars)

Implements com.univocity.parsers.common.input.CharAppender.prepend.

Does nothing

Parameters
chars:char[]

Doc from com.univocity.parsers.common.input.CharAppender.prepend.

the character sequence to prepend in front of the current accumulated value.

Annotations
@Override
removeback to summary
public void remove(int from, int length)

Implements com.univocity.parsers.common.input.CharAppender.remove.

Does nothing

Parameters
from:int

Doc from com.univocity.parsers.common.input.CharAppender.remove.

the starting position in the buffer (inclusive)

length:int

Doc from com.univocity.parsers.common.input.CharAppender.remove.

the number of characters to accumulate from the given start position

Annotations
@Override
resetback to summary
public void reset()

Implements com.univocity.parsers.common.input.CharAppender.reset.

Does nothing

Annotations
@Override
resetWhitespaceCountback to summary
public void resetWhitespaceCount()

Implements com.univocity.parsers.common.input.CharAppender.resetWhitespaceCount.

Does nothing

Annotations
@Override
subSequenceback to summary
public CharSequence subSequence(int i, int i1)

Implements java.lang.CharSequence.subSequence.

Does nothing

Parameters
i:int

Doc from java.lang.CharSequence.subSequence.

the start index, inclusive

i1:int

Doc from java.lang.CharSequence.subSequence.

the end index, exclusive

Returns:CharSequence

Doc from java.lang.CharSequence.subSequence.

the specified subsequence

Annotations
@Override
substringback to summary
public String substring(int from, int length)

Implements com.univocity.parsers.common.input.CharAppender.substring.

Does nothing

Parameters
from:int

Doc from com.univocity.parsers.common.input.CharAppender.substring.

the starting position in the buffer

length:int

Doc from com.univocity.parsers.common.input.CharAppender.substring.

the number of characters to accumulate from the given start position

Returns:String

Doc from com.univocity.parsers.common.input.CharAppender.substring.

a String with the section of characters accumulated by this appender.

Annotations
@Override
updateWhitespaceback to summary
public void updateWhitespace()

Implements com.univocity.parsers.common.input.CharAppender.updateWhitespace.

Does nothing

Annotations
@Override
whitespaceCountback to summary
public int whitespaceCount()

Implements com.univocity.parsers.common.input.CharAppender.whitespaceCount.

Returns 0 as this appender does nothing.

Returns:int

0 as this appender does nothing.

Annotations
@Override