org.sonar.sslr.internal.matchers
Class ImmutableInputBuffer
java.lang.Object
org.sonar.sslr.internal.matchers.ImmutableInputBuffer
- All Implemented Interfaces:
- InputBuffer
public class ImmutableInputBuffer
- extends Object
- implements InputBuffer
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ImmutableInputBuffer
public ImmutableInputBuffer(char[] buffer)
length
public int length()
- Specified by:
length in interface InputBuffer
charAt
public char charAt(int i)
- Specified by:
charAt in interface InputBuffer
extractLine
public String extractLine(int lineNumber)
- Description copied from interface:
InputBuffer
- Returns content of a line for a given line number.
Numbering of lines starts from 1.
- Specified by:
extractLine in interface InputBuffer
getLineCount
public int getLineCount()
- Description copied from interface:
InputBuffer
- Returns number of lines, which is always equal to number of line terminators plus 1.
- Specified by:
getLineCount in interface InputBuffer
getPosition
public InputBuffer.Position getPosition(int index)
- Specified by:
getPosition in interface InputBuffer
Copyright © 2009-2014 SonarSource. All Rights Reserved.