jline
Class CursorBuffer

java.lang.Object
  extended by jline.CursorBuffer

public class CursorBuffer
extends Object

A CursorBuffer is a holder for a StringBuffer that also contains the current cursor position.


Field Summary
 StringBuffer buffer
           
 int cursor
           
 
Constructor Summary
CursorBuffer()
           
 
Method Summary
 char current()
           
 void insert(char c)
          Insert the specific character into the buffer, setting the cursor position ahead one.
 void insert(String str)
          Insert the specified String into the buffer, setting the cursor to the end of the insertion point.
 int length()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

cursor

public int cursor

buffer

public final StringBuffer buffer
Constructor Detail

CursorBuffer

public CursorBuffer()
Method Detail

length

public int length()

current

public char current()

insert

public void insert(char c)
Insert the specific character into the buffer, setting the cursor position ahead one.

Parameters:
c - the character to insert

insert

public void insert(String str)
Insert the specified String into the buffer, setting the cursor to the end of the insertion point.

Parameters:
str - the String to insert. Must not be null.

toString

public String toString()
Overrides:
toString in class Object