From 60aef466778be1522fbf012703496170a8c1e1bb Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Fri, 12 May 2017 18:49:33 +0200 Subject: [PATCH] Improved Javadoc. --- .../util/cmdexec/util/CommandSplitter.java | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/fr/devinsy/util/cmdexec/util/CommandSplitter.java b/src/fr/devinsy/util/cmdexec/util/CommandSplitter.java index 0704972..bac5b58 100644 --- a/src/fr/devinsy/util/cmdexec/util/CommandSplitter.java +++ b/src/fr/devinsy/util/cmdexec/util/CommandSplitter.java @@ -24,7 +24,7 @@ import org.slf4j.LoggerFactory; import fr.devinsy.util.strings.StringList; -/** +/** * The Class SplitWorker. * * @author Christian Pierre MOMON (christian.momon@devinsy.fr) @@ -41,8 +41,19 @@ public class CommandSplitter private static Logger logger = LoggerFactory.getLogger(CommandSplitter.class);; - /** - * Split a string command to an array managing quote and simple quote. + /**

Split a string command to an array managing quote and simple + * quote.

+ * + *

Examples:

+ * + *
+	 * CommandSplitter.split(null) = null
+	 * CommandSplitter.split("") = { }
+	 * CommandSplitter.split("   ")  = { }
+	 * CommandSplitter.split("   aaa bbb   ") = { "aaa", "bbb" }
+	 * CommandSplitter.split("aaa \"bb'b b\" ccc") = { "aaa", "bb'b b", "ccc" }
+	 * CommandSplitter.split("aaa 'bb\"b b'  ccc") = { "aaa", "bb\"b b", "ccc" }
+	 * 
* * @param command * the command