public class CommandLineUtils
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
SEPARATOR
The command line argument separator.
|
| Constructor and Description |
|---|
CommandLineUtils() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
concatenate(java.util.ArrayList<java.lang.String> args)
Returns the list of arguments as space separated string for the command
line.
|
static java.lang.String |
concatenate(java.lang.String[] args)
Returns the list of arguments as space separated string for the command
line.
|
static java.lang.String |
getCommandLineArgument(java.util.ArrayList<java.io.File> files)
Returns the list of file as argument for the command line.
|
static java.lang.String |
getCommandLineArgument(java.io.File file)
Returns the file as argument for the command line.
|
static java.util.ArrayList<java.lang.Double> |
getDoubleListFromString(java.lang.String aString,
java.lang.String separator)
Parses a list of doubles from a command line option.
|
static java.util.ArrayList<java.io.File> |
getFiles(java.lang.String optionInput,
java.util.ArrayList<java.lang.String> fileExtentions)
Returns a list of files as imported from the command line option.
|
static java.util.ArrayList<java.lang.Integer> |
getIntegerListFromString(java.lang.String aString,
java.lang.String separator)
Parses a list of integers from a command line option.
|
static java.lang.String |
getQuoteType()
Returns the quote type to use.
|
static java.util.ArrayList<java.lang.String> |
splitInput(java.lang.String cliInput)
Splits the input of comma separated command line input and returns the
results as an arraylist.
|
public static final java.lang.String SEPARATOR
public static java.lang.String getCommandLineArgument(java.util.ArrayList<java.io.File> files)
files - the filespublic static java.lang.String concatenate(java.util.ArrayList<java.lang.String> args)
args - the argumentspublic static java.lang.String concatenate(java.lang.String[] args)
args - the argumentspublic static java.lang.String getQuoteType()
public static java.lang.String getCommandLineArgument(java.io.File file)
file - the filepublic static java.util.ArrayList<java.lang.String> splitInput(java.lang.String cliInput)
cliInput - the CLI inputpublic static java.util.ArrayList<java.io.File> getFiles(java.lang.String optionInput,
java.util.ArrayList<java.lang.String> fileExtentions)
throws java.io.FileNotFoundException
optionInput - the command line optionfileExtentions - the file extensions to be consideredjava.io.FileNotFoundException - exception thrown whenever a file is not
foundpublic static java.util.ArrayList<java.lang.Integer> getIntegerListFromString(java.lang.String aString,
java.lang.String separator)
aString - the command line optionseparator - the separator used to separate the stringpublic static java.util.ArrayList<java.lang.Double> getDoubleListFromString(java.lang.String aString,
java.lang.String separator)
aString - the command line optionseparator - the separator used to separate the stringCopyright © 2014. All Rights Reserved.