gnu.lists
Interface CharSeq

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

public interface CharSeq
extends java.lang.CharSequence, Sequence

A sequence where each element is a character.


Field Summary
 
Fields inherited from interface gnu.lists.Sequence
ATTRIBUTE_VALUE, BOOLEAN_VALUE, CDATA_VALUE, CHAR_VALUE, COMMENT_VALUE, DOCUMENT_VALUE, DOUBLE_VALUE, EOF_VALUE, eofValue, 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
 
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)
           
 java.lang.CharSequence subSequence(int start, int end)
           
 java.lang.String toString()
           
 void writeTo(java.lang.Appendable dest)
           
 void writeTo(int start, int count, java.lang.Appendable dest)
          Append a specified subsequence to an Appendable.
 
Methods inherited from interface gnu.lists.Sequence
elements, fill, get, isEmpty, size
 
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, subList, toArray, toArray
 
Methods inherited from interface gnu.lists.Consumable
consume
 

Method Detail

length

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

Specified by:
length in interface java.lang.CharSequence

charAt

char charAt(int index)
Specified by:
charAt in interface java.lang.CharSequence

getChars

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


setCharAt

void setCharAt(int index,
               char ch)

fill

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


fill

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

subSequence

java.lang.CharSequence subSequence(int start,
                                   int end)
Specified by:
subSequence in interface java.lang.CharSequence

writeTo

void writeTo(int start,
             int count,
             java.lang.Appendable dest)
             throws java.io.IOException
Append a specified subsequence to an Appendable. An allowable implementation is: dest.append(this, start, start+count). Hence implementors of Appendable should avoid calling writeTo - though they can call getChars.

Throws:
java.io.IOException

writeTo

void writeTo(java.lang.Appendable dest)
             throws java.io.IOException
Throws:
java.io.IOException

consume

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

toString

java.lang.String toString()
Specified by:
toString in interface java.lang.CharSequence
Overrides:
toString in class java.lang.Object