|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjcuda.utils.CommandLine
public class CommandLine
Command line argument utility functions, similar to the CUTIL
functions.
All command line arguments begin with '--' followed by the token.
The token and value are separated by '='.
Example:
--samples=50
Arrays have the form
--model=[one.obj,two.obj,three.obj]
(without whitespaces)
Method Summary | |
---|---|
static boolean |
checkCommandLineFlag(java.lang.String[] argv,
java.lang.String flagName)
Returns whether the given command line arguments contain an argument with the given name (the name must be given without the "--" prefix); |
static float |
getCommandLineArgumentFloat(java.lang.String[] argv,
java.lang.String argName,
float defaultValue)
Returns the value of the command line argument with the given name as a float. |
static int |
getCommandLineArgumentInt(java.lang.String[] argv,
java.lang.String argName,
int defaultValue)
Returns the value of the command line argument with the given name as an int. |
static java.util.List<java.lang.String> |
getCommandLineArgumentListString(java.lang.String[] argv,
java.lang.String argName)
Returns the value of the command line argument with the given name as a list of strings. |
static java.lang.String |
getCommandLineArgumentString(java.lang.String[] argv,
java.lang.String argName)
Returns the value of the command line argument with the given name as a String. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static boolean checkCommandLineFlag(java.lang.String[] argv, java.lang.String flagName)
argv
- The argumentsflagName
- The argument to look for
public static int getCommandLineArgumentInt(java.lang.String[] argv, java.lang.String argName, int defaultValue)
argv
- The argumentsargName
- The name of the argumentdefaultValue
- The default value to use of no value was given
java.lang.IllegalArgumentException
- If the given argument has
no appropriate valuepublic static float getCommandLineArgumentFloat(java.lang.String[] argv, java.lang.String argName, float defaultValue)
argv
- The argumentsargName
- The name of the argumentdefaultValue
- The default value to use of no value was given
java.lang.IllegalArgumentException
- If the given argument has
no appropriate valuepublic static java.lang.String getCommandLineArgumentString(java.lang.String[] argv, java.lang.String argName)
argv
- The argumentsargName
- The name of the argument
public static java.util.List<java.lang.String> getCommandLineArgumentListString(java.lang.String[] argv, java.lang.String argName)
argv
- The argumentsargName
- The name of the argument
java.lang.IllegalArgumentException
- If the given argument has
no appropriate value
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |