gate.corpora
Class DocumentStaxUtils.ArrayCharSequence

java.lang.Object
  extended by gate.corpora.DocumentStaxUtils.ArrayCharSequence
All Implemented Interfaces:
CharSequence
Enclosing class:
DocumentStaxUtils

static class DocumentStaxUtils.ArrayCharSequence
extends Object
implements CharSequence

Thin wrapper class to use a char[] as a CharSequence. The array is not copied - changes to the array are reflected by the CharSequence methods.


Field Summary
(package private)  char[] array
           
 
Constructor Summary
DocumentStaxUtils.ArrayCharSequence(char[] array)
           
 
Method Summary
 char charAt(int i)
           
 int length()
           
 CharSequence subSequence(int start, int end)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

array

char[] array
Constructor Detail

DocumentStaxUtils.ArrayCharSequence

DocumentStaxUtils.ArrayCharSequence(char[] array)
Method Detail

charAt

public final char charAt(int i)
Specified by:
charAt in interface CharSequence

length

public final int length()
Specified by:
length in interface CharSequence

subSequence

public CharSequence subSequence(int start,
                                int end)
Specified by:
subSequence in interface CharSequence

toString

public String toString()
Specified by:
toString in interface CharSequence
Overrides:
toString in class Object