@Immutable public final class CharSequenceInputBuffer extends Object implements InputBuffer
InputBuffer over a CharSequence
 A CharSequence is the most basic character interface in the JDK.
 It is implemented by a lot of character related classes, including String, and is also the argument type used by a Pattern's Matcher.
Among other things, this means you can use this package on very large
 files using largetext, which
 implements CharSequence over multi-gigabyte files.
| Constructor and Description | 
|---|
| CharSequenceInputBuffer(CharSequence charSequence) | 
| Modifier and Type | Method and Description | 
|---|---|
| char | charAt(int index)Returns the character at the given index. | 
| int | codePointAt(int index)Returns the Unicode code point starting at a given index | 
| String | extract(IndexRange range)Constructs a new  Stringfrom all character covered by the given
 IndexRange. | 
| String | extract(int start,
       int end)Constructs a new  Stringfrom all character between the given
 indices. | 
| String | extractLine(int lineNumber)Constructs a new  Stringcontaining all characters with the given
 line number except for the trailing newline. | 
| int | getLineCount()Returns the number of lines in the input buffer. | 
| IndexRange | getLineRange(int lineNumber)Get the index range matching a given line number | 
| Position | getPosition(int index)Returns the line and column number of the character with the given index
 encapsulated in a  Positionobject. | 
| int | length() | 
public CharSequenceInputBuffer(@Nonnull CharSequence charSequence)
public char charAt(int index)
InputBufferIf the index is greater than, or equal to, the buffer's length, this
 method returns Chars.EOI.
charAt in interface InputBufferindex - the indexpublic int codePointAt(int index)
InputBufferIf the index is greater than, or equal to, the buffer's length, this method returns -1.
codePointAt in interface InputBufferindex - the indexpublic String extract(int start, int end)
InputBufferString from all character between the given
 indices. Invalid indices are automatically adjusted to their respective
 boundary.extract in interface InputBufferstart - the start index (inclusively)end - the end index (exclusively)public String extract(IndexRange range)
InputBufferString from all character covered by the given
 IndexRange.extract in interface InputBufferrange - the IndexRangepublic Position getPosition(int index)
InputBufferPosition object. The very first character has
 the line number 1 and the column number 1.getPosition in interface InputBufferindex - the index of the character to get the line number ofpublic String extractLine(int lineNumber)
InputBufferString containing all characters with the given
 line number except for the trailing newline.extractLine in interface InputBufferlineNumber - the line number to getpublic IndexRange getLineRange(int lineNumber)
InputBuffergetLineRange in interface InputBufferlineNumber - the line numberpublic int getLineCount()
InputBuffergetLineCount in interface InputBufferpublic int length()
length in interface InputBuffer