|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.dna.common.text.TokenStream.CharacterArrayStream
public static final class TokenStream.CharacterArrayStream

An implementation of TokenStream.CharacterStream that works with a single character array.
| Constructor Summary | |
|---|---|
TokenStream.CharacterArrayStream(char[] content)
|
|
| Method Summary | |
|---|---|
boolean |
hasNext()
Determine if there is another character available in this stream. |
int |
index()
Get the index for the last character returned from TokenStream.CharacterStream.next(). |
boolean |
isNext(char c)
Determine if the next character on the sream is the supplied value. |
boolean |
isNext(char nextChar1,
char nextChar2)
Determine if the next two characters on the stream match the supplied values. |
boolean |
isNext(char nextChar1,
char nextChar2,
char nextChar3)
Determine if the next three characters on the sream match the supplied values. |
boolean |
isNextAnyOf(char[] characters)
Determine if the next character on the stream matches one of the supplied characters. |
boolean |
isNextAnyOf(String characters)
Determine if the next character on the stream matches one of the supplied characters. |
boolean |
isNextLetterOrDigit()
Determine if the next character on the sream is a letter or digit. |
boolean |
isNextValidXmlCharacter()
Determine if the next character on the sream is a valid XML character. |
boolean |
isNextValidXmlNameCharacter()
Determine if the next character on the sream is a valid XML NCName character. |
boolean |
isNextValidXmlNcNameCharacter()
Determine if the next character on the sream is a valid XML NCName character. |
boolean |
isNextWhitespace()
Determine if the next character on the sream is a whitespace character. |
char |
next()
Obtain the next character value, and advance the stream. |
Position |
position(int startIndex)
Get the position for the last character returned from TokenStream.CharacterStream.next(). |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TokenStream.CharacterArrayStream(char[] content)
| Method Detail |
|---|
public boolean hasNext()
hasNext in interface TokenStream.CharacterStreamTokenStream.CharacterStream.next() can be called), or false otherwiseTokenStream.CharacterStream.hasNext()public int index()
TokenStream.CharacterStream.next().
index in interface TokenStream.CharacterStreamTokenStream.CharacterStream.index()public Position position(int startIndex)
TokenStream.CharacterStream.next().
position in interface TokenStream.CharacterStreamstartIndex -
TokenStream.CharacterStream.position(int)public char next()
next in interface TokenStream.CharacterStreamTokenStream.CharacterStream.next()public boolean isNext(char c)
isNext in interface TokenStream.CharacterStreamc - the character value to compare to the next character on the stream
next character and it is the supplied character, or false otherwiseTokenStream.CharacterStream.isNext(char)
public boolean isNext(char nextChar1,
char nextChar2)
isNext in interface TokenStream.CharacterStreamnextChar1 - the character value to compare to the next character on the streamnextChar2 - the character value to compare to the character immediately after the next character on the stream
nextChar and
the second matches followingCharTokenStream.CharacterStream.isNext(char, char)
public boolean isNext(char nextChar1,
char nextChar2,
char nextChar3)
isNext in interface TokenStream.CharacterStreamnextChar1 - the character value to compare to the next character on the streamnextChar2 - the character value to compare to the second character on the streamnextChar3 - the character value to compare to the second character on the stream
nextChar and
the second matches followingCharTokenStream.CharacterStream.isNext(char, char, char)public boolean isNextAnyOf(char[] characters)
isNextAnyOf in interface TokenStream.CharacterStreamcharacters - the characters to match
next character and it does match one of the supplied characters, or false
otherwiseTokenStream.CharacterStream.isNextAnyOf(char[])public boolean isNextAnyOf(String characters)
isNextAnyOf in interface TokenStream.CharacterStreamcharacters - the characters to match
next character and it does match one of the supplied characters, or false
otherwiseTokenStream.CharacterStream.isNextAnyOf(java.lang.String)public boolean isNextWhitespace()
whitespace character. This
method does not advance the stream.
isNextWhitespace in interface TokenStream.CharacterStreamnext character and it is a whitespace character, or false otherwiseTokenStream.CharacterStream.isNextWhitespace()public boolean isNextLetterOrDigit()
letter or digit. This method
does not advance the stream.
isNextLetterOrDigit in interface TokenStream.CharacterStreamnext character and it is a letter or digit, or false otherwiseTokenStream.CharacterStream.isNextLetterOrDigit()public boolean isNextValidXmlCharacter()
valid XML character. This method
does not advance the stream.
isNextValidXmlCharacter in interface TokenStream.CharacterStreamnext character and it is a valid XML character, or false otherwiseTokenStream.CharacterStream.isNextValidXmlCharacter()public boolean isNextValidXmlNameCharacter()
valid XML NCName character.
This method does not advance the stream.
isNextValidXmlNameCharacter in interface TokenStream.CharacterStreamnext character and it is a valid XML Name character, or false otherwiseTokenStream.CharacterStream.isNextValidXmlNameCharacter()public boolean isNextValidXmlNcNameCharacter()
valid XML NCName character.
This method does not advance the stream.
isNextValidXmlNcNameCharacter in interface TokenStream.CharacterStreamnext character and it is a valid XML NCName character, or false otherwiseTokenStream.CharacterStream.isNextValidXmlNcNameCharacter()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||