public class Tokenizer extends Object
Constructor and Description |
---|
Tokenizer(String str,
String delim,
String literalDelim,
boolean returnDelims)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
hasMoreTokens()
Test if there are more tokens which can be returned.
|
static void |
main(String[] args) |
String |
nextToken()
Return the next token.
|
public Tokenizer(String str, String delim, String literalDelim, boolean returnDelims)
str
- the source string to be parseddelim
- The set of delimiter charactersliteralDelim
- Literal string delimitersreturnDelims
- If true then delimiters should be returned as tokenspublic String nextToken()
NoSuchElementException
- if there are no more tokens availablepublic boolean hasMoreTokens()
public static void main(String[] args)
Licenced under the Apache License, Version 2.0