Package aQute.libg.qtokens
Class QuotedTokenizer
java.lang.Object
aQute.libg.qtokens.QuotedTokenizer
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionQuotedTokenizer
(String string, String separators) QuotedTokenizer
(String string, String separators, boolean returnTokens) QuotedTokenizer
(String string, String separators, boolean returnTokens, boolean retainQuotes) -
Method Summary
Modifier and TypeMethodDescriptionprivate QuotedTokenizer
copy()
char
String[]
iterator()
static boolean
quote
(StringBuilder sb, String value) Quote a string when it is not a token (OSGi).private void
quotedString
(StringBuilder sb, char quote) private static Spliterator<String>
stream()
toString()
-
Field Details
-
TOKEN_P
-
string
-
separators
-
returnTokens
private final boolean returnTokens -
retainQuotes
private final boolean retainQuotes -
index
private int index -
peek
-
separator
private char separator
-
-
Constructor Details
-
QuotedTokenizer
-
QuotedTokenizer
-
QuotedTokenizer
-
-
Method Details
-
copy
-
toString
-
nextToken
-
nextToken
-
quotedString
-
getTokens
-
getSeparator
public char getSeparator() -
getTokenSet
-
stream
-
stream
-
spliterator
- Specified by:
spliterator
in interfaceIterable<String>
-
spliterator
-
iterator
-
iterator
-
quote
Quote a string when it is not a token (OSGi). If the string is already quoted (or backslash quoted) then these are removed before inspection to see if it is a token.- Parameters:
sb
- the outputvalue
- the value to quote
-