gnu.lists

Interface CharSeq

public interface CharSeq extends CharSequence, Sequence

A sequence where each element is a character.
Method Summary
charcharAt(int index)
voidconsume(int start, int count, Consumer out)
voidfill(char value)
Set all the elements to a given character.
voidfill(int fromIndex, int toIndex, char value)
voidgetChars(int srcBegin, int srcEnd, char[] dst, int dstBegin)
Copy characters into a destination buffer.
intlength()
Get length of string, in characters.
voidsetCharAt(int index, char ch)
CharSequencesubSequence(int start, int end)
StringtoString()
voidwriteTo(int start, int count, Writer dest)
Write out (part of) this string.
voidwriteTo(Writer str)

Method Detail

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, Writer dest)
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(Writer str)