public abstract class CommandParameter extends Object implements Cloneable
| Constructor and Description |
|---|
CommandParameter(String id,
String des)
non-empty constructor (member variables cannot be changed after construction)
|
| Modifier and Type | Method and Description |
|---|---|
String |
getDescription()
returns the description for this parameter
|
String |
getIdentifier()
returns this parameters name (the identifier)
|
abstract CommandParameter |
instantiate(String s)
instantiate the command with the given argument string if valid
|
abstract boolean |
isValid(String s)
Checks, if the given String is a valid argument for this command parameter
|
public String getIdentifier()
public String getDescription()
public abstract boolean isValid(String s)
s - the given input stringpublic abstract CommandParameter instantiate(String s)
s - the given argument stringCopyright © 2018. All rights reserved.