public class CursorBuffer extends Object
StringBuilder
that also contains the current cursor position.Modifier and Type | Field and Description |
---|---|
StringBuilder |
buffer |
int |
cursor |
Constructor and Description |
---|
CursorBuffer() |
Modifier and Type | Method and Description |
---|---|
boolean |
clear() |
CursorBuffer |
copy() |
char |
current() |
boolean |
isOverTyping() |
int |
length() |
char |
nextChar() |
void |
setOverTyping(boolean b) |
String |
toString() |
String |
upToCursor() |
void |
write(char c)
Write the specific character into the buffer, setting the cursor position
ahead one.
|
void |
write(CharSequence str)
Insert the specified chars into the buffer, setting the cursor to the end of the insertion point.
|
public int cursor
public final StringBuilder buffer
public CursorBuffer copy()
public boolean isOverTyping()
public void setOverTyping(boolean b)
public int length()
public char nextChar()
public char current()
public void write(char c)
isOverTyping()
.c
- the character to insertpublic void write(CharSequence str)
public boolean clear()
public String upToCursor()
Copyright © 2017. All Rights Reserved.