public CommandOption findOption ( String name ) { Assert . notNullOrEmptyTrimmed ( name , "Missing name!" ) ; Optional < CommandOption > found = options . stream ( ) . filter ( o -> o . getSetting ( ) . equals ( name ) || o . isShort ( name ) || o . isLong ( name ) ) . findFirst ( ) ; return found . orElse ( null ) ; }
Finds option by short long or setting name