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()
TokenStream.CharacterStreamhasNext in interface TokenStream.CharacterStreamTokenStream.CharacterStream.next() can be called), or false otherwisepublic int index()
TokenStream.CharacterStreamTokenStream.CharacterStream.next().index in interface TokenStream.CharacterStreampublic Position position(int startIndex)
TokenStream.CharacterStreamTokenStream.CharacterStream.next().position in interface TokenStream.CharacterStreampublic char next()
TokenStream.CharacterStreamnext in interface TokenStream.CharacterStreampublic boolean isNext(char c)
TokenStream.CharacterStreamisNext 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 otherwisepublic boolean isNext(char nextChar1,
char nextChar2)
TokenStream.CharacterStreamisNext 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 followingCharpublic boolean isNext(char nextChar1,
char nextChar2,
char nextChar3)
TokenStream.CharacterStreamisNext 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 followingCharpublic boolean isNextAnyOf(char[] characters)
TokenStream.CharacterStreamisNextAnyOf in interface TokenStream.CharacterStreamcharacters - the characters to matchnext character and it does match one of the supplied characters, or false
otherwisepublic boolean isNextAnyOf(String characters)
TokenStream.CharacterStreamisNextAnyOf in interface TokenStream.CharacterStreamcharacters - the characters to matchnext character and it does match one of the supplied characters, or false
otherwisepublic boolean isNextWhitespace()
TokenStream.CharacterStreamwhitespace character. This
method does not advance the stream.isNextWhitespace in interface TokenStream.CharacterStreamnext character and it is a whitespace character, or false otherwisepublic boolean isNextLetterOrDigit()
TokenStream.CharacterStreamletter or digit. This method
does not advance the stream.isNextLetterOrDigit in interface TokenStream.CharacterStreamnext character and it is a letter or digit, or false otherwisepublic boolean isNextValidXmlCharacter()
TokenStream.CharacterStreamvalid XML character. This method
does not advance the stream.isNextValidXmlCharacter in interface TokenStream.CharacterStreamnext character and it is a valid XML character, or false otherwisepublic boolean isNextValidXmlNameCharacter()
TokenStream.CharacterStreamvalid 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 otherwisepublic boolean isNextValidXmlNcNameCharacter()
TokenStream.CharacterStreamvalid 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 otherwiseCopyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.