Package com.gengoai.application
Class NamedOption.NamedOptionBuilder
- java.lang.Object
-
- com.gengoai.application.NamedOption.NamedOptionBuilder
-
- Enclosing class:
- NamedOption
public static class NamedOption.NamedOptionBuilder extends Object
Builder class to create a named options
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NamedOption.NamedOptionBuilder
alias(String alias)
Adds an alias for this optionNamedOption
build()
Builds the named optionNamedOption.NamedOptionBuilder
defaultValue(Object defaultValue)
Sets the default value for the optionNamedOption.NamedOptionBuilder
description(String description)
Sets the description of the optionNamedOption.NamedOptionBuilder
name(String name)
Sets the name of the optionNamedOption.NamedOptionBuilder
required(boolean required)
Sets whether or not the option is requiredString
toString()
NamedOption.NamedOptionBuilder
type(Class<?> type)
Sets the type of the option
-
-
-
Method Detail
-
alias
public NamedOption.NamedOptionBuilder alias(String alias)
Adds an alias for this option- Parameters:
alias
- the alias to add- Returns:
- the named option builder
-
build
public NamedOption build()
Builds the named option- Returns:
- the named option
-
defaultValue
public NamedOption.NamedOptionBuilder defaultValue(Object defaultValue)
Sets the default value for the option- Parameters:
defaultValue
- the default value- Returns:
- the named option builder
-
description
public NamedOption.NamedOptionBuilder description(String description)
Sets the description of the option- Parameters:
description
- the description- Returns:
- the named option builder
-
name
public NamedOption.NamedOptionBuilder name(String name)
Sets the name of the option- Parameters:
name
- the name- Returns:
- the named option builder
-
required
public NamedOption.NamedOptionBuilder required(boolean required)
Sets whether or not the option is required- Parameters:
required
- True - the option is required to be set- Returns:
- the named option builder
-
type
public NamedOption.NamedOptionBuilder type(Class<?> type)
Sets the type of the option- Parameters:
type
- the type- Returns:
- the named option builder
-
-