Package org.sonar.sslr.internal.matchers
Class ImmutableInputBuffer
java.lang.Object
org.sonar.sslr.internal.matchers.ImmutableInputBuffer
- All Implemented Interfaces:
InputBuffer
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.sonar.sslr.internal.matchers.InputBuffer
InputBuffer.Position -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncharcharAt(int i) extractLine(int lineNumber) Returns content of a line for a given line number.intReturns number of lines, which is always equal to number of line terminators plus 1.getPosition(int index) intlength()
-
Constructor Details
-
ImmutableInputBuffer
public ImmutableInputBuffer(char[] buffer)
-
-
Method Details
-
length
public int length()- Specified by:
lengthin interfaceInputBuffer
-
charAt
public char charAt(int i) - Specified by:
charAtin interfaceInputBuffer
-
extractLine
Description copied from interface:InputBufferReturns content of a line for a given line number. Numbering of lines starts from 1.- Specified by:
extractLinein interfaceInputBuffer
-
getLineCount
public int getLineCount()Description copied from interface:InputBufferReturns number of lines, which is always equal to number of line terminators plus 1.- Specified by:
getLineCountin interfaceInputBuffer
-
getPosition
- Specified by:
getPositionin interfaceInputBuffer
-