gnu.lists

Interface CharSeq

All Superinterfaces:
CharSequence, java.util.List, Consumable, Sequence
Known Implementing Classes:
Buffer, BufferContent, BufferContent, CharBuffer, FString, SubCharSeq, SwingBuffer, SwtBuffer

public interface CharSeq
extends CharSequence, Sequence

A sequence where each element is a character.

Fields inherited from interface gnu.lists.Sequence

ATTRIBUTE_VALUE, BOOLEAN_VALUE, CDATA_VALUE, CHAR_VALUE, COMMENT_VALUE, DOCUMENT_VALUE, DOUBLE_VALUE, EOF_VALUE, FLOAT_VALUE, GROUP_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

Method Summary

char
charAt(int index)
void
consume(int start, int count, Consumer out)
void
fill(char value)
Set all the elements to a given character.
void
fill(int fromIndex, int toIndex, char value)
void
getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin)
Copy characters into a destination buffer.
int
length()
Get length of string, in characters.
void
setCharAt(int index, char ch)
CharSequence
subSequence(int start, int end)
String
toString()
void
writeTo(int start, int count, java.io.Writer dest)
Write out (part of) this string.
void
writeTo(java.io.Writer str)

Methods inherited from interface gnu.lists.Consumable

consume

Methods inherited from interface gnu.lists.Sequence

elements, fill, get, isEmpty, size

Method Details

charAt

public char charAt(int index)

consume

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

fill

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

fill

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

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.

length

public int length()
Get length of string, in characters. Synonym for size(), for compatibility with String and StringBuffer.

setCharAt

public void setCharAt(int index,
                      char ch)

subSequence

public CharSequence subSequence(int start,
                                int end)

toString

public String toString()

writeTo

public void writeTo(int start,
                    int count,
                    java.io.Writer dest)
            throws java.io.IOException
Write out (part of) this string.
Parameters:
start - index of initial character to write
count - number of characters to write
dest - where to write the characters

writeTo

public void writeTo(java.io.Writer str)
            throws java.io.IOException