public class Parameter extends Object implements Serializable
AbstractCommands| Constructor and Description |
|---|
Parameter(String name,
String description,
String defaultValue,
Collection<String> validValues)
Constructs a new parameter.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
String |
getDefaultValue()
Returns an optional default value to use if no value is provided by the user or if no user is present to
provide a value.
|
String |
getDescription()
Returns a human readable description of the parameter for use if prompting the user for a value.
|
String |
getName()
Returns the name of the parameter.
|
List<String> |
getValidValues()
Returns an optional list of valid values that the parameter may take, if
null then there is no
a restriction to a finite set. |
int |
hashCode() |
static List<Parameter> |
toList(Map<?,Parameter> parameters)
|
static Map<String,Parameter> |
toMap(Iterable<Parameter> parameters)
|
String |
toString() |
public Parameter(@NonNull
String name,
@CheckForNull
String description,
@CheckForNull
String defaultValue,
@CheckForNull
Collection<String> validValues)
name - the name of the parameter.description - a human readable description of the parameter.defaultValue - an optional default value.@NonNull public static Map<String,Parameter> toMap(@CheckForNull Iterable<Parameter> parameters)
@NonNull public String getName()
defaultValue.defaultValue.@CheckForNull public String getDescription()
@CheckForNull public String getDefaultValue()
@CheckForNull public List<String> getValidValues()
null then there is no
a restriction to a finite set.null then there is no
a restriction to a finite set.Copyright © 2004-2014. All Rights Reserved.