Package org.jline.reader.impl
Class BufferImpl
- java.lang.Object
-
- org.jline.reader.impl.BufferImpl
-
-
Constructor Summary
Constructors Modifier Constructor Description BufferImpl()BufferImpl(int size)privateBufferImpl(BufferImpl buffer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private intadjust(int i)intatChar(int i)booleanbackspace()Issue a backspace.intbackspace(int num)Issue num backspaces.booleanclear()BufferImplcopy()voidcopyFrom(Buffer buf)intcurrChar()booleancurrChar(int ch)intcursor()booleancursor(int position)Move the cursor position to the specified absolute index.booleandelete()intdelete(int num)booleandown()private intgetCursorCol()intlength()intmove(int num)Move the cursor where characters.private voidmoveGapToCursor()booleanmoveXY(int dx, int dy)intnextChar()intprevChar()java.lang.Stringsubstring(int start)java.lang.Stringsubstring(int start, int end)java.lang.StringtoString()booleanup()java.lang.StringupToCursor()voidwrite(int c)Write the specific character into the buffer, setting the cursor position ahead one.private voidwrite(int[] ucps)voidwrite(int c, boolean overTyping)Write the specific character into the buffer, setting the cursor position ahead one.voidwrite(java.lang.CharSequence str)Insert the specified chars into the buffer, setting the cursor to the end of the insertion point.voidwrite(java.lang.CharSequence str, boolean overTyping)
-
-
-
Constructor Detail
-
BufferImpl
public BufferImpl()
-
BufferImpl
public BufferImpl(int size)
-
BufferImpl
private BufferImpl(BufferImpl buffer)
-
-
Method Detail
-
copy
public BufferImpl copy()
-
adjust
private int adjust(int i)
-
write
public void write(int c)
Write the specific character into the buffer, setting the cursor position ahead one.
-
write
public void write(int c, boolean overTyping)Write the specific character into the buffer, setting the cursor position ahead one. The text may overwrite or insert based on the current setting ofoverTyping.
-
write
public void write(java.lang.CharSequence str)
Insert the specified chars into the buffer, setting the cursor to the end of the insertion point.
-
write
public void write(java.lang.CharSequence str, boolean overTyping)
-
write
private void write(int[] ucps)
-
substring
public java.lang.String substring(int start, int end)
-
upToCursor
public java.lang.String upToCursor()
- Specified by:
upToCursorin interfaceBuffer
-
cursor
public boolean cursor(int position)
Move the cursor position to the specified absolute index.
-
move
public int move(int num)
Move the cursor where characters.
-
getCursorCol
private int getCursorCol()
-
backspace
public int backspace(int num)
Issue num backspaces.
-
backspace
public boolean backspace()
Issue a backspace.
-
toString
public java.lang.String toString()
-
moveGapToCursor
private void moveGapToCursor()
-
-