public class Parameter
extends java.lang.Object
UserDefinedScript
,
UserDefinedCommand
Modifier and Type | Field and Description |
---|---|
static int |
BOOLEAN
The boolean value type.
|
static int |
CHOICE
The choice value type.
|
static int |
DOUBLE
The double value type.
|
static int |
INTEGER
The integer value type.
|
static int |
NONE
No value type.
|
static int |
STRING
The string value type.
|
Constructor and Description |
---|
Parameter()
Constructor.
|
Parameter(java.lang.String text)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addChoice(int key,
java.lang.String val)
Adds a choice value.
|
boolean |
getBoolean()
Gets a boolean value.
|
java.lang.String |
getChoice(int key)
Gets a choice value for a specific key.
|
int |
getCurrentChoice()
Gets the current choice value.
|
double |
getDouble()
Gets a double value.
|
double |
getDoubleMax()
Gets the maximum double value limit.
|
double |
getDoubleMin()
Gets the minimum double value limit.
|
java.lang.String |
getHelpText()
Gets the help text for this parameter.
|
int |
getInteger()
Gets an integer value.
|
int |
getIntegerMax()
Gets the maximum integer value limit.
|
int |
getIntegerMin()
Gets the minimum integer value limit.
|
java.util.Enumeration |
getKeys()
Gets an enumeration of the choice value keys.
|
int |
getMaxStringLength()
Gets the maximum string length.
|
java.lang.String |
getString()
Gets a string value.
|
java.lang.String |
getText()
Gets the text for this parameter.
|
int |
getType()
Gets the type of this parameter.
|
java.lang.Object |
getValue()
Gets the value as an object.
|
boolean |
isValid()
Indicates if the parameter is valid or not.
|
void |
removeChoice(int key)
Removes a choice value.
|
boolean |
setBoolean(boolean val)
Sets a boolean value.
|
boolean |
setCurrentChoice(int key)
Sets the current choice value.
|
boolean |
setDouble(double val)
Sets a double value.
|
boolean |
setDoubleRange(double min,
double max)
Sets the double value range.
|
void |
setHelpText(java.lang.String helpText)
Sets the help text for this parameter.
|
boolean |
setInteger(int val)
Sets an integer value.
|
boolean |
setIntegerRange(int min,
int max)
Sets the integer value range.
|
boolean |
setMaxStringLength(int maxLength)
Sets the maximum string length.
|
boolean |
setString(java.lang.String val)
Sets a string value.
|
void |
setText(java.lang.String text)
Sets the text for this parameter.
|
boolean |
setType(int type)
Sets the type of this parameter.
|
java.lang.String |
toString()
Returns a string representation of the parameter.
|
public static final int NONE
public static final int STRING
public static final int BOOLEAN
public static final int INTEGER
public static final int DOUBLE
public static final int CHOICE
public Parameter()
public Parameter(java.lang.String text)
text
- The parameter text to display.public java.lang.String toString()
toString
in class java.lang.Object
public boolean isValid()
true
if valid, otherwise false
.public void setText(java.lang.String text)
text
- The parameter text.public java.lang.String getText()
public void setHelpText(java.lang.String helpText)
helpText
- The parameter help text.public java.lang.String getHelpText()
public boolean setType(int type)
public int getType()
public java.lang.Object getValue()
public boolean setString(java.lang.String val)
val
- The string value.true
if successful, otherwise false
public java.lang.String getString()
public boolean setBoolean(boolean val)
val
- The boolean value.true
if successful, otherwise false
public boolean getBoolean()
public boolean setInteger(int val)
val
- The integer value.true
if successful, otherwise false
public int getInteger()
public boolean setDouble(double val)
val
- The double value.true
if successful, otherwise false
public double getDouble()
public boolean addChoice(int key, java.lang.String val)
key
- The key.val
- The choice value to add.public java.lang.String getChoice(int key)
key
- The key of the choice value to get.public java.util.Enumeration getKeys()
public void removeChoice(int key)
key
- The key of the choice value to remove.public boolean setCurrentChoice(int key)
key
- The key of the current choice value.true
if successful, otherwise false
public int getCurrentChoice()
public boolean setMaxStringLength(int maxLength)
maxLength
- The maximum string length.true
if successful, otherwise false
public int getMaxStringLength()
public boolean setIntegerRange(int min, int max)
min
- The minimum integer value.max
- The maximum integer value.true
if successful, otherwise false
public int getIntegerMin()
public int getIntegerMax()
public boolean setDoubleRange(double min, double max)
min
- The minimum double value.max
- The maximum double value.true
if successful, otherwise false
public double getDoubleMin()
public double getDoubleMax()