public static final class TokenStream.CharacterArrayStream extends Object implements TokenStream.CharacterStream
TokenStream.CharacterStream that works with a single character array.| Constructor and Description |
|---|
TokenStream.CharacterArrayStream(char[] content) |
| Modifier and Type | Method and Description |
|---|---|
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(). |
public TokenStream.CharacterArrayStream(char[] content)
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 streamnext 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 streamnextChar 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 streamnextChar and
the second matches followingCharTokenStream.CharacterStream.isNext(char, char, char)public boolean isNextAnyOf(char[] characters)
isNextAnyOf in interface TokenStream.CharacterStreamcharacters - the characters to matchnext 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 matchnext 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()Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.