Klasse QuotedStringTokenizer
java.lang.Object
java.util.StringTokenizer
org.xbib.interlibrary.catalog.matching.string.QuotedStringTokenizer
- Alle implementierten Schnittstellen:
Enumeration<Object>
,Iterator<String>
A string tokenizer that understands quotes and escape characters.
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungConstructs a string tokenizer for the specified string.QuotedStringTokenizer
(String str, String delim) Constructs a string tokenizer for the specified string. "\"\'" are used as quotes, and '\\' is used as the escape character.QuotedStringTokenizer
(String str, String delim, String quotes, char escape, boolean returnDelims) Constructs a string tokenizer for the specified string. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungint
Calculates the number of times that this tokenizer's nextToken method can be called before it generates an exception.boolean
Returns the same value as the hasMoreTokens method.boolean
Tests if there are more tokens available from this tokenizer's string.boolean
hasNext()
next()
Returns the same value as the nextToken method, except that its declared return value is Object rather than String.Returns the next token from this string tokenizer.Returns the next token in this string tokenizer's string.void
remove()
Von Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Von Schnittstelle geerbte Methoden java.util.Enumeration
asIterator
Von Schnittstelle geerbte Methoden java.util.Iterator
forEachRemaining
-
Konstruktordetails
-
QuotedStringTokenizer
Constructs a string tokenizer for the specified string. The default delimiters for StringTokenizer are used. "\"\'" are used as quotes, and '\\' is used as the escape character.- Parameter:
str
- str
-
QuotedStringTokenizer
Constructs a string tokenizer for the specified string. "\"\'" are used as quotes, and '\\' is used as the escape character.- Parameter:
str
- strdelim
- delim
-
QuotedStringTokenizer
public QuotedStringTokenizer(String str, String delim, String quotes, char escape, boolean returnDelims) Constructs a string tokenizer for the specified string. Quotes cannot be delimiters, and the escape character can be neither a quote nor a delimiter.- Parameter:
str
- strdelim
- delimquotes
- quotesescape
- escapereturnDelims
- returnDelims
-
-
Methodendetails
-
hasMoreTokens
public boolean hasMoreTokens()Tests if there are more tokens available from this tokenizer's string. Pre-condition: not inside a quoted string (token).- Setzt außer Kraft:
hasMoreTokens
in KlasseStringTokenizer
-
nextToken
Returns the next token from this string tokenizer.- Setzt außer Kraft:
nextToken
in KlasseStringTokenizer
-
nextToken
Returns the next token in this string tokenizer's string.- Setzt außer Kraft:
nextToken
in KlasseStringTokenizer
-
countTokens
public int countTokens()Calculates the number of times that this tokenizer's nextToken method can be called before it generates an exception.- Setzt außer Kraft:
countTokens
in KlasseStringTokenizer
-
hasMoreElements
public boolean hasMoreElements()Returns the same value as the hasMoreTokens method.- Angegeben von:
hasMoreElements
in SchnittstelleEnumeration<Object>
- Setzt außer Kraft:
hasMoreElements
in KlasseStringTokenizer
-
nextElement
Returns the same value as the nextToken method, except that its declared return value is Object rather than String.- Angegeben von:
nextElement
in SchnittstelleEnumeration<Object>
- Setzt außer Kraft:
nextElement
in KlasseStringTokenizer
-
hasNext
public boolean hasNext() -
next
-
remove
public void remove()
-