public static final class TokenStream.CharacterArrayStream extends Object implements TokenStream.CharacterStream
TokenStream.CharacterStream
that works with a single character array.Constructor and Description |
---|
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 boolean hasNext()
TokenStream.CharacterStream
hasNext
in interface TokenStream.CharacterStream
TokenStream.CharacterStream.next()
can be called), or false otherwisepublic int index()
TokenStream.CharacterStream
TokenStream.CharacterStream.next()
.index
in interface TokenStream.CharacterStream
public Position position(int startIndex)
TokenStream.CharacterStream
TokenStream.CharacterStream.next()
.position
in interface TokenStream.CharacterStream
public char next()
TokenStream.CharacterStream
next
in interface TokenStream.CharacterStream
public boolean isNext(char c)
TokenStream.CharacterStream
isNext
in interface TokenStream.CharacterStream
c
- 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.CharacterStream
isNext
in interface TokenStream.CharacterStream
nextChar1
- 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 followingChar
public boolean isNext(char nextChar1, char nextChar2, char nextChar3)
TokenStream.CharacterStream
isNext
in interface TokenStream.CharacterStream
nextChar1
- 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 followingChar
public boolean isNextAnyOf(char[] characters)
TokenStream.CharacterStream
isNextAnyOf
in interface TokenStream.CharacterStream
characters
- the characters to matchnext
character and it does match one of the supplied characters, or false
otherwisepublic boolean isNextAnyOf(String characters)
TokenStream.CharacterStream
isNextAnyOf
in interface TokenStream.CharacterStream
characters
- the characters to matchnext
character and it does match one of the supplied characters, or false
otherwisepublic boolean isNextWhitespace()
TokenStream.CharacterStream
whitespace character
. This
method does not advance the stream.isNextWhitespace
in interface TokenStream.CharacterStream
next
character and it is a whitespace character, or false otherwisepublic boolean isNextLetterOrDigit()
TokenStream.CharacterStream
letter or digit
. This method
does not advance the stream.isNextLetterOrDigit
in interface TokenStream.CharacterStream
next
character and it is a letter or digit, or false otherwisepublic boolean isNextValidXmlCharacter()
TokenStream.CharacterStream
valid XML character
. This method
does not advance the stream.isNextValidXmlCharacter
in interface TokenStream.CharacterStream
next
character and it is a valid XML character, or false otherwisepublic boolean isNextValidXmlNameCharacter()
TokenStream.CharacterStream
valid XML NCName character
.
This method does not advance the stream.isNextValidXmlNameCharacter
in interface TokenStream.CharacterStream
next
character and it is a valid XML Name character, or false otherwisepublic boolean isNextValidXmlNcNameCharacter()
TokenStream.CharacterStream
valid XML NCName character
.
This method does not advance the stream.isNextValidXmlNcNameCharacter
in interface TokenStream.CharacterStream
next
character and it is a valid XML NCName character, or false otherwiseCopyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.