Class CursorBuffer
java.lang.Object
jline.console.CursorBuffer
A holder for a
StringBuilder that also contains the current cursor position.- Since:
- 2.0
- Author:
- Marc Prud'hommeaux, Jason Dillon
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanclear()copy()charcurrent()booleanintlength()charnextChar()voidsetOverTyping(boolean b) toString()voidwrite(char c) 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.
-
Field Details
-
cursor
public int cursor -
buffer
-
-
Constructor Details
-
CursorBuffer
public CursorBuffer()
-
-
Method Details
-
copy
-
isOverTyping
public boolean isOverTyping() -
setOverTyping
public void setOverTyping(boolean b) -
length
public int length() -
nextChar
public char nextChar() -
current
public char current() -
write
public void write(char c) Write the specific character into the buffer, setting the cursor position ahead one. The text may overwrite or insert based on the current setting ofisOverTyping().- Parameters:
c- the character to insert
-
write
Insert the specified chars into the buffer, setting the cursor to the end of the insertion point. -
clear
public boolean clear() -
upToCursor
-
toString
-