Class IntegerCommandParameter
java.lang.Object
org.tweetyproject.plugin.parameter.CommandParameter
org.tweetyproject.plugin.parameter.IntegerCommandParameter
- All Implemented Interfaces:
Cloneable
This parameter holds a number-interval of possible arguments
- Author:
- Bastian Wolf
-
Constructor Summary
ConstructorDescriptionIntegerCommandParameter
(String id, String des) IntegerCommandParameter
(String id, String des, String interval) IntegerCommandParameter
(String id, String des, Interval<Integer> interval) -
Method Summary
Modifier and TypeMethodDescriptionclone()
Clones the objectreturns each possible selection argumentgetValue()
returns the given instantiation argument value for this parameterinstantiates a new parameter iff the given value is valid for this command parameterboolean
checks whether a cli input parameter argument is valid for the called command parametervoid
setInterval
(String interval) sets new selection parametervoid
sets the instantiated parameter argument value, value has to be one of the options contained in selectionsMethods inherited from class org.tweetyproject.plugin.parameter.CommandParameter
getDescription, getIdentifier
-
Constructor Details
-
IntegerCommandParameter
-
IntegerCommandParameter
-
IntegerCommandParameter
-
-
Method Details
-
setInterval
sets new selection parameter- Parameters:
interval
- some string
-
getInterval
returns each possible selection argument- Returns:
- each possible selection argument
-
getValue
returns the given instantiation argument value for this parameter- Returns:
- the given instantiation argument value for this parameter
-
setValue
sets the instantiated parameter argument value, value has to be one of the options contained in selections- Parameters:
value
- the value given as argument value
-
isValid
checks whether a cli input parameter argument is valid for the called command parameter- Specified by:
isValid
in classCommandParameter
- Parameters:
s
- the given input string- Returns:
- true if valid, false if not
-
instantiate
instantiates a new parameter iff the given value is valid for this command parameter- Specified by:
instantiate
in classCommandParameter
- Parameters:
s
- the given argument string- Returns:
- The CommandParameter instance or null if the given string is not valid.
-
clone
Clones the object
-