private CommandOption findOption ( String argument ) { if ( "--" . equals ( argument ) || argument == null ) { return null ; } if ( argument . startsWith ( "--" ) ) { return builder . findLong ( argument ) ; } if ( argument . startsWith ( "-" ) ) { return builder . findShort ( argument ) ; } // ok find short or long CommandOption found = builder . findShort ( argument ) ; if ( found == null ) { found = builder . findLong ( argument ) ; } return found ; }
Extracts argument and returns setting