|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.StringTokenizer net.sf.xbus.base.core.ASCIITokenizer
public class ASCIITokenizer
A StringTokenizer, that conveniently tokenizes a ASCII-file The main difference to its base class is, that it doesnīt count the delimiters as tokens in method countTokens() and that its methods nextElement() and nextToken() donīt return a delimiter, but an empty Object/String if there are two delimiters next to each other.
StringTokenizer
Constructor Summary | |
---|---|
ASCIITokenizer(java.lang.String str,
java.lang.String delim)
Creates a new instance of ASCIIOfferTokenizer |
Method Summary | |
---|---|
int |
countTokens()
Counts the number of tokens in the string to be tokenized The delimiters are not counted unlike in class StringTokenizer |
java.lang.String |
getDelimiters()
Returns the delimiters of this tokenizer |
java.lang.String |
getStr()
Returns the string to be tokenized |
java.lang.Object |
nextElement()
Returns the next element of the string to be tokenized It does quite the same as the method nextToken() but it
returns an Object instead of a String |
java.lang.String |
nextToken()
Returns the next token of the string to be tokenized |
Methods inherited from class java.util.StringTokenizer |
---|
hasMoreElements, hasMoreTokens, nextToken |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ASCIITokenizer(java.lang.String str, java.lang.String delim)
ASCIIOfferTokenizer
str
- String to be tokenizeddelim
- String separatorMethod Detail |
---|
public int countTokens()
The delimiters are not counted unlike in class StringTokenizer
countTokens
in class java.util.StringTokenizer
public java.lang.String getDelimiters()
public java.lang.String getStr()
public java.lang.Object nextElement()
It does quite the same as the method nextToken()
but it
returns an Object
instead of a String
nextElement
in interface java.util.Enumeration<java.lang.Object>
nextElement
in class java.util.StringTokenizer
nextToken()
public java.lang.String nextToken()
nextToken
in class java.util.StringTokenizer
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |