gnu.jemacs.swt

Class SwtCharBuffer

Implemented Interfaces:
CharSequence, java.util.List, Consumable, Sequence
Known Direct Subclasses:
BufferContent

public class SwtCharBuffer
extends GapVector
implements CharSequence

TODO Explain that this is all about.

Field Summary

protected FString
chars
protected LineOffsets
lineOffsets

Fields inherited from class gnu.lists.GapVector

base, gapEnd, gapStart

Fields inherited from interface gnu.lists.Sequence

ATTRIBUTE_VALUE, BOOLEAN_VALUE, CDATA_VALUE, CHAR_VALUE, COMMENT_VALUE, DOCUMENT_VALUE, DOUBLE_VALUE, ELEMENT_VALUE, EOF_VALUE, FLOAT_VALUE, INT_S16_VALUE, INT_S32_VALUE, INT_S64_VALUE, INT_S8_VALUE, INT_U16_VALUE, INT_U32_VALUE, INT_U64_VALUE, INT_U8_VALUE, OBJECT_VALUE, PRIM_VALUE, PROCESSING_INSTRUCTION_VALUE, TEXT_BYTE_VALUE, eofValue

Constructor Summary

SwtCharBuffer(int initialSize)

Method Summary

char
charAt(int index)
void
delete(int where, int count)
protected void
gapReserve(int size)
void
getChars(int start, int end, char[] dest, int destStart)
void
insert(int where, String str)
int
length()
int
offset2pos(int offset)
int
pos2offset(int pos)
protected static String
printable(String s)
protected void
shiftGap(int newGapStart)
protected void
show()
CharSequence
subSequence(int start, int end)
String
toString()

Methods inherited from class gnu.lists.GapVector

add, addPos, consumePosRange, createPos, fill, fillPosRange, gapReserve, gapReserve, get, getNextKind, getSegment, hasNext, isAfterPos, nextIndex, removePosRange, set, shiftGap, size

Methods inherited from class gnu.lists.AbstractSequence

add, add, addAll, addAll, addPos, clear, compare, compare, compare, consume, consumeNext, consumePosRange, contains, containsAll, copyPos, createPos, createRelativePos, elements, endPos, equals, equals, fill, fill, fillPosRange, firstAttributePos, firstChildPos, firstChildPos, fromEndIndex, get, get, getAttribute, getAttributeLength, getContainingSequenceSize, getEffectiveIndex, getIndexDifference, getIterator, getIterator, getIteratorAtPos, getLowBound, getNextKind, getNextTypeName, getNextTypeObject, getPosNext, getPosPrevious, getSize, gotoAttributesStart, gotoChildrenStart, gotoParent, hasNext, hasPrevious, hashCode, indexOf, isAfterPos, isEmpty, iterator, lastIndexOf, listIterator, listIterator, nextIndex, nextIndex, nextMatching, nextPos, parentPos, previousPos, rank, releasePos, remove, remove, removeAll, removePos, removePosRange, retainAll, set, set, setPosNext, setPosPrevious, size, stableCompare, startPos, subList, subSequence, subSequencePos, toArray, toArray, toString, toString, unsupported, unsupportedException

Field Details

chars

protected FString chars

lineOffsets

protected LineOffsets lineOffsets

Constructor Details

SwtCharBuffer

public SwtCharBuffer(int initialSize)

Method Details

charAt

public char charAt(int index)
See Also:
java.lang.CharSequence.charAt(int)

delete

public void delete(int where,
                   int count)
Parameters:
where -
count -

gapReserve

protected void gapReserve(int size)
Overrides:
gapReserve in interface GapVector

getChars

public void getChars(int start,
                     int end,
                     char[] dest,
                     int destStart)

insert

public void insert(int where,
                   String str)
Parameters:
where -
str -

length

public int length()
See Also:
java.lang.CharSequence.length()

offset2pos

public int offset2pos(int offset)

pos2offset

public int pos2offset(int pos)

printable

protected static String printable(String s)

shiftGap

protected void shiftGap(int newGapStart)
Overrides:
shiftGap in interface GapVector

show

protected void show()

subSequence

public CharSequence subSequence(int start,
                                int end)

toString

public String toString()
Overrides:
toString in interface AbstractSequence