Package org.daisy.cli
Class AbstractUI.Argument
- java.lang.Object
-
- org.daisy.cli.AbstractUI.Definition
-
- org.daisy.cli.AbstractUI.Argument
-
- Direct Known Subclasses:
AbstractUI.OptionalArgument
- Enclosing class:
- AbstractUI
public static class AbstractUI.Argument extends AbstractUI.Definition
Provides the information needed by an application argument.- Author:
- Joel HÃ¥kansson
-
-
Constructor Summary
Constructors Constructor Description Argument(java.lang.String name, java.lang.String desc)
Creates a new Argument.Argument(java.lang.String name, java.lang.String desc, java.util.List<AbstractUI.Definition> values)
Creates a new Argument with a finite list of acceptable values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<AbstractUI.Definition>
getValues()
Gets the list of acceptable values.boolean
hasValues()
Returns true if this argument has a finite list of acceptable values.-
Methods inherited from class org.daisy.cli.AbstractUI.Definition
getDescription, getName
-
-
-
-
Constructor Detail
-
Argument
public Argument(java.lang.String name, java.lang.String desc)
Creates a new Argument.- Parameters:
name
- the name of the argumentdesc
- the description of the argument
-
Argument
public Argument(java.lang.String name, java.lang.String desc, java.util.List<AbstractUI.Definition> values)
Creates a new Argument with a finite list of acceptable values.- Parameters:
name
- the name of the argumentdesc
- the description of the argumentvalues
- the list of acceptable values
-
-
Method Detail
-
hasValues
public boolean hasValues()
Returns true if this argument has a finite list of acceptable values.- Returns:
- returns true if a finite list of acceptable values exist, false otherwise
-
getValues
public java.util.List<AbstractUI.Definition> getValues()
Gets the list of acceptable values.- Returns:
- returns the list of acceptable values, or null if the list of possible values is infinite
-
-