gnu.lists

Class CharBuffer

public class CharBuffer extends StableVector implements CharSeq, Serializable

Editable character sequence using a a buffer-gap implementstion and self-adjusting position. Can implement (the text part of) an Emacs buffer, or a javax.swing.text.AbstractDocument.Content
Constructor Summary
CharBuffer(FString str)
CharBuffer(int initialSize)
protected CharBuffer()
Method Summary
charcharAt(int index)
voidconsume(int start, int count, Consumer dest)
voiddelete(int where, int count)
voiddump()
voidfill(int fromIndex, int toIndex, char value)
voidfill(char value)
Set all the elements to a given character.
char[]getArray()
voidgetChars(int srcBegin, int srcEnd, char[] dst, int dstBegin)
Copy characters into a destination buffer.
voidinsert(int where, String str, boolean beforeMarkers)
intlength()
voidsetCharAt(int index, char value)
CharSequencesubSequence(int start, int end)
StringtoString()
voidwriteTo(int start, int count, Writer dest)
voidwriteTo(Writer dest)

Constructor Detail

CharBuffer

public CharBuffer(FString str)

CharBuffer

public CharBuffer(int initialSize)

CharBuffer

protected CharBuffer()

Method Detail

charAt

public char charAt(int index)

consume

public void consume(int start, int count, Consumer dest)

delete

public void delete(int where, int count)

dump

public void dump()

fill

public void fill(int fromIndex, int toIndex, char value)

fill

public final void fill(char value)
Set all the elements to a given character.

getArray

public char[] getArray()

getChars

public void getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin)
Copy characters into a destination buffer. Same interface as java.lang.String's getChars.

insert

public void insert(int where, String str, boolean beforeMarkers)

length

public int length()

setCharAt

public void setCharAt(int index, char value)

subSequence

public CharSequence subSequence(int start, int end)

toString

public String toString()

writeTo

public void writeTo(int start, int count, Writer dest)

writeTo

public void writeTo(Writer dest)