public class OwEscapedStringTokenizer extends Object
Utility class to get a tokenized string representation, using specific escape characters.
Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.
For licensing information read the license.txt file or
go to: http://wiki.alfresco.com
Modifier and Type | Field and Description |
---|---|
static char |
STANDARD_DELIMITER
the standard delimiter character to be used
|
static char |
STANDARD_ESCAPE
the standard escape character to be used
|
Constructor and Description |
---|
OwEscapedStringTokenizer(String text_p) |
OwEscapedStringTokenizer(String text_p,
char delimiter_p,
char escapechar_p) |
Modifier and Type | Method and Description |
---|---|
protected static void |
appendEscapedToken(Appendable buf_p,
String token_p,
char delimiter_p,
char escape_p)
append the given token converting it with given escapes
|
static String |
createDelimitedString(Collection<String> tokens_p)
create a delimited string out of the given string collection that can later be tokenized
|
static String |
createDelimitedString(Collection<String> tokens_p,
char delimiter_p,
char escape_p)
create a delimited string out of the given string collection that can later be tokenized
|
boolean |
hasNext() |
String |
next()
get next token
|
Collection<String> |
toCollection()
convert the tokenizer into a collection
|
public static final char STANDARD_DELIMITER
public static final char STANDARD_ESCAPE
public OwEscapedStringTokenizer(String text_p, char delimiter_p, char escapechar_p)
text_p
- delimiter_p
- escapechar_p
- public OwEscapedStringTokenizer(String text_p)
text_p
- public boolean hasNext()
public String next()
public Collection<String> toCollection()
public static String createDelimitedString(Collection<String> tokens_p)
tokens_p
- public static String createDelimitedString(Collection<String> tokens_p, char delimiter_p, char escape_p)
tokens_p
- delimiter_p
- escape_p
- protected static void appendEscapedToken(Appendable buf_p, String token_p, char delimiter_p, char escape_p)
buf_p
- token_p
- delimiter_p
- escape_p
- Copyright © 2014 Alfresco Business Solutions. All Rights Reserved.