Package org.jline.reader.impl
Class BufferImpl
java.lang.Object
org.jline.reader.impl.BufferImpl
- All Implemented Interfaces:
Buffer
A holder for a
StringBuilder that also contains the current cursor position.- Since:
- 2.0
- Author:
- Marc Prud'hommeaux, Jason Dillon
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintatChar(int i) booleanIssue a backspace.intbackspace(int num) Issue num backspaces.booleanclear()copy()voidintcurrChar()booleancurrChar(int ch) intcursor()booleancursor(int position) Move the cursor position to the specified absolute index.booleandelete()intdelete(int num) booleandown()intlength()intmove(int num) Move the cursor where characters.booleanmoveXY(int dx, int dy) intnextChar()intprevChar()substring(int start) substring(int start, int end) toString()booleanup()voidwrite(int c) Write the specific character into the buffer, setting the cursor position ahead one.voidwrite(int c, boolean overTyping) Write the specific character into the buffer, setting the cursor position ahead one.voidwrite(CharSequence str) Insert the specified chars into the buffer, setting the cursor to the end of the insertion point.voidwrite(CharSequence str, boolean overTyping) voidzeroOut()Clear any internal buffer.
-
Constructor Details
-
BufferImpl
public BufferImpl() -
BufferImpl
public BufferImpl(int size)
-
-
Method Details
-
copy
-
cursor
-
length
-
currChar
-
currChar
-
prevChar
-
nextChar
-
atChar
-
write
-
write
-
write
Insert the specified chars into the buffer, setting the cursor to the end of the insertion point. -
write
-
clear
-
substring
-
substring
-
upToCursor
- Specified by:
upToCursorin interfaceBuffer
-
cursor
-
move
-
up
-
down
-
moveXY
-
backspace
-
backspace
-
delete
-
delete
-
toString
-
copyFrom
-
zeroOut
-