|
GXPARSE hosted by |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectca.gorman.xml.parse.toolkit.AbstractCharSequence
public class AbstractCharSequence
Character source for Listener
methods
that receive character input from the
Parser
.
Warning: AbstractCharSequence
may only hold a reference
to data instead of a copy of the data. Change of the data after creation of
an instance of AbstractCharSequence
may invalidate the instance
or cause one of the instance methods to throw an exception.
This class is implemented for safety and ease of debugging, rather than for speed. It can be subclassed or replaced if speed is more important.
Method Summary | |
---|---|
char |
charAt(int n)
|
int |
length()
|
static AbstractCharSequence |
newInstance(char[] chr)
Construct CharSequence on an array of characters. |
static AbstractCharSequence |
newInstance(char[] chr,
int offset,
int length)
Construct CharSequence on a subarray of characters. |
static AbstractCharSequence |
newInstance(CharSequence charSequence)
Construct CharSequence on another
charSequence . |
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 |
Method Detail |
---|
public static AbstractCharSequence newInstance(char[] chr, int offset, int length)
Construct CharSequence
on a subarray of characters.
NullPointerException
- if charSequence
is null.public static AbstractCharSequence newInstance(char[] chr)
Construct CharSequence
on an array of characters.
NullPointerException
- if charSequence
is null.public static AbstractCharSequence newInstance(CharSequence charSequence)
Construct CharSequence
on another
charSequence
.
This simply adds another level of indirection (by delegation) which
may be useful when there is a possibility of future changes in the way
that a CharSequence
is to be created.
NullPointerException
- if charSequence
is null.public char charAt(int n)
charAt
in interface CharSequence
public int length()
length
in interface CharSequence
public String toString()
toString
in interface CharSequence
toString
in class Object
public CharSequence subSequence(int start, int end)
subSequence
in interface CharSequence
|
GXPARSE download | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |