public abstract class Util
extends java.lang.Object
| Constructor and Description |
|---|
Util() |
| Modifier and Type | Method and Description |
|---|---|
static java.util.ArrayList<java.lang.String> |
separateArgs(java.lang.String src,
java.util.Collection<java.lang.Character> delimiters,
java.lang.Character escapeChar,
java.util.Map<java.lang.Character,java.lang.Boolean> quotes)
Separate string to a list of strings using UNIX-Shell-styled method.
|
public static java.util.ArrayList<java.lang.String> separateArgs(java.lang.String src,
java.util.Collection<java.lang.Character> delimiters,
java.lang.Character escapeChar,
java.util.Map<java.lang.Character,java.lang.Boolean> quotes)
throws java.lang.IllegalArgumentException
src - The string to be sepatated. May not be null.delimiters - The delimiters applied. May not be null or empty.escapeChar - The escape character. If it is null, there will be no
escape applied.quotes - The quote characters for key and booleans indicate
whether escapes work inside the quotes. May not be null, may be empty.ArrayList contains sepatated strings.java.lang.IllegalArgumentException - If there exists an unclosed quote, or
the last character of src is the escape character, or
delimiters is empty.java.lang.NullPointerException - If delimiters or quotes is
null.