Top Description Fields Constructors Methods
org.jabref.logic.util.strings

public Class QuotedStringTokenizer

extends Object
Class Inheritance

A String tokenizer that works just like StringTokenizer, but considers quoted characters (which do not act as delimiters).

Field Summary

Modifier and TypeField and Description
private final String
private final int
private final String
private int
private final char

Constructor Summary

AccessConstructor and Description
public
QuotedStringTokenizer(String
The String to be tokenized.
content
,
String
The delimiter characters.
delimiters
,
char
The quoting character. Every character (including, but not limited to, delimiters) that is preceded by this character is not treated as a delimiter, but as a token component.
quoteCharacter
)

Method Summary

Modifier and TypeMethod and Description
public boolean
private boolean
isDelimiter(char c)

public String

Returns:

the next token from the content string, ending at the next unquoted delimiter. Does not unquote the string itself.
nextToken
()

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

contentback to summary
private final String content
contentLengthback to summary
private final int contentLength
delimitersback to summary
private final String delimiters
indexback to summary
private int index
quoteCharback to summary
private final char quoteChar

Constructor Detail

QuotedStringTokenizerback to summary
public QuotedStringTokenizer(String content, String delimiters, char quoteCharacter)
Parameters
content:String

The String to be tokenized.

delimiters:String

The delimiter characters.

quoteCharacter:char

The quoting character. Every character (including, but not limited to, delimiters) that is preceded by this character is not treated as a delimiter, but as a token component.

Method Detail

hasMoreTokensback to summary
public boolean hasMoreTokens()
isDelimiterback to summary
private boolean isDelimiter(char c)
nextTokenback to summary
public String nextToken()
Returns:String

the next token from the content string, ending at the next unquoted delimiter. Does not unquote the string itself.