public static int getIntArg ( CommandLine cl , Option option , int defaultValue ) { int arg = defaultValue ; if ( cl . hasOption ( option . getLongOpt ( ) ) ) { String argOption = cl . getOptionValue ( option . getLongOpt ( ) ) ; arg = Integer . parseInt ( argOption ) ; } return arg ; }
Gets the value of an option from the command line .