|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.slamd.parameter.Parameter
com.sun.slamd.parameter.FloatParameter
This class defines a parameter whose value is a mathematical floating-point value. It can also support upper and lower bounds, although they are not required to be enforced.
| Field Summary |
| Fields inherited from class com.sun.slamd.parameter.Parameter |
description, displayName, isRequired, name, value |
| Constructor Summary | |
FloatParameter()
Creates a new instance of the Parameter to be used when decoding values transported over the network, and should not be used by jobs to create parameters. |
|
FloatParameter(java.lang.String name)
Creates a new floating-point parameter with the specified name. |
|
FloatParameter(java.lang.String name,
boolean isRequired,
float value)
Creates a new floating-point parameter with the specified name, value, and required/optional indicator. |
|
FloatParameter(java.lang.String name,
float value)
Creates a new floating-point parameter with the specified name and value. |
|
FloatParameter(java.lang.String name,
java.lang.String displayName,
boolean isRequired,
float value)
Creates a new floating-point parameter with the specified name, display name, value, and required/optional indicator. |
|
FloatParameter(java.lang.String name,
java.lang.String displayName,
java.lang.String description,
boolean isRequired,
float value)
Creates a new floating-point parameter with the specified name, display name, description, value, and required/optional indicator. |
|
FloatParameter(java.lang.String name,
java.lang.String displayName,
java.lang.String description,
boolean isRequired,
float value,
boolean hasLowerBound,
float lowerBound,
boolean hasUpperBound,
float upperBound)
Creates a new floating-point parameter with the specified name, display name, description, value, and required/optional indicator, as well as information pertaining to upper and lower bounds. |
|
| Method Summary | |
java.lang.Object |
clone()
Creates a clone of this parameter. |
java.lang.String |
getDisplayValue()
Retrieves a String that can be used when displaying the value of this parameter to the end user. |
float |
getFloatValue()
Retrieves the value associated with this parameter as a Java float. |
java.lang.String |
getHTMLDisplayValue()
Retrieves a String that can be used when displaying the value of this parameter to the end user in the context of an HTML page. |
java.lang.String |
getHTMLInputForm(java.lang.String prefix)
Retrieves a string of text that can be used to request a value for this parameter using an HTML form. |
java.lang.String |
getInvalidReason(java.lang.Object value)
Method getInvalidReason |
float |
getLowerBound()
Retrieves the lower bound that will be used if a lower bound is to be enforced. |
float |
getUpperBound()
Retrieves the upper bound that will be used if an upper bound is to be enforced. |
java.lang.Object |
getValue()
Retrieves the value associated with this parameter. |
java.lang.String |
getValueString()
Retrieves a string representation of the value of this parameter. |
int |
getVisibleColumns()
Retrieves the number of columns that should be visible in the HTML input form. |
boolean |
hasLowerBound()
Indicates whether a lower bound will be enforced for this parameter. |
boolean |
hasUpperBound()
Indicates whether an upper bound will be enforced for this parameter. |
void |
htmlInputFormToValue(java.lang.String[] values)
Specifies the value of this parameter based on the provided text that would be returned from posting an HTML form. |
void |
setLowerBound(float lowerBound)
Specifies the value to use as the lower bound, and indicates that a lower bound is to be enforced for this parameter. |
void |
setUpperBound(float upperBound)
Specifies the value to use as the upper bound, and indicates that an upper bound is to be enforced for this parameter. |
void |
setValue(float value)
Specifies the value to use for this parameter. |
void |
setValue(java.lang.Object value)
Specifies the value to use for this parameter. |
void |
setValueFrom(Parameter parameter)
Sets the value for this parameter from the information in the provided parameter. |
void |
setValueFromString(java.lang.String valueString)
Specifies the value to use for this parameter from the provided String. |
void |
setVisibleColumns(int visibleColumns)
Specifies the number of columns that should be visible in the HTML input form. |
void |
unsetLowerBound()
Specifies that a lower bound should not be enforced for this parameter. |
void |
unsetUpperBound()
Specifies that an upper bound should not be enforced for this parameter. |
| Methods inherited from class com.sun.slamd.parameter.Parameter |
decode, encode, getDescription, getDisplayName, getHTMLPostValue, getInvalidReason, getName, hasValue, isRequired, isValid, isValid, setDescription, setDisplayName, setName, setRequired, toString |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public FloatParameter()
setName, setDisplayName,
setDescription, or setValueFromString, then it
should be done here.
public FloatParameter(java.lang.String name)
name - The name to use for this parameter.
public FloatParameter(java.lang.String name,
float value)
name - The name to use for this parameter.value - The value to use for this parameter.
public FloatParameter(java.lang.String name,
boolean isRequired,
float value)
name - The name to use for this parameter.isRequired - Indicates whether this parameter is required to have a
value.value - The value to use for this parameter.
public FloatParameter(java.lang.String name,
java.lang.String displayName,
boolean isRequired,
float value)
name - The name to use for this parameter.displayName - The name to use for this parameter when it is
displayed to the end user.isRequired - Indicates whether this parameter is required to have a
value.value - The value to use for this parameter.
public FloatParameter(java.lang.String name,
java.lang.String displayName,
java.lang.String description,
boolean isRequired,
float value)
name - The name to use for this parameter.displayName - The name to use for this parameter when it is
displayed to the end user.description - The description to use for this parameter.isRequired - Indicates whether this parameter is required to have a
value.value - The value to use for this parameter.
public FloatParameter(java.lang.String name,
java.lang.String displayName,
java.lang.String description,
boolean isRequired,
float value,
boolean hasLowerBound,
float lowerBound,
boolean hasUpperBound,
float upperBound)
name - The name to use for this parameter.displayName - The name to use for this parameter when it is
displayed to the end user.description - The description to use for this parameter.isRequired - Indicates whether this parameter is required to have
a value.value - The value to use for this parameter.hasLowerBound - Indicates whether the lower bound will be enforced
for this parameter.lowerBound - The lower bound to use for this parameter (will only
be effective if hasLowerBound is true).hasUpperBound - Indicates whether the upper bound will be enforced
for this parameter.upperBound - The upper bound to use for this parameter (will only
be effective if hasUpperBound is true).| Method Detail |
public float getFloatValue()
public java.lang.Object getValue()
null will be returned. If it does have a value,
then that value will be returned as a Java Float object.
getValue in class Parameter
public void setValue(float value)
throws InvalidValueException
value - The value to use for this parameter.
InvalidValueException - If the specified value does not meet the
upper or lower bounds requirements (if they
are to be enforced).
public void setValue(java.lang.Object value)
throws InvalidValueException
setValue in class Parametervalue - The value to use for this parameter.
InvalidValueException - If the specified value cannot be interpreted
as a Java float, or if it does not meet the
upper or lower bounds requirements (if they
are to be enforced).public void setValueFrom(Parameter parameter)
setValueFrom in class Parameterparameter - The parameter from which to take the value for this
parameter.public java.lang.String getValueString()
getValueString in class Parameter
public void setValueFromString(java.lang.String valueString)
throws InvalidValueException
setValueFromString in class ParametervalueString - The string representation of the value to use for this
parameter.
InvalidValueException - If the provided value cannot be used to
provide a value for this parameter.public float getLowerBound()
public void setLowerBound(float lowerBound)
lowerBound - The value to use as the lower bound.public void unsetLowerBound()
public boolean hasLowerBound()
true if a lower bound will be enforced, or
false if not.public float getUpperBound()
public void setUpperBound(float upperBound)
upperBound - The value to use as the upper bound.public void unsetUpperBound()
public boolean hasUpperBound()
true if an upper bound will be enforced, or
false if not.public java.lang.String getInvalidReason(java.lang.Object value)
getInvalidReason in class Parametervalue - an Object
public java.lang.String getDisplayValue()
getDisplayValue in class Parameterpublic java.lang.String getHTMLDisplayValue()
getHTMLDisplayValue in class Parameterpublic int getVisibleColumns()
public void setVisibleColumns(int visibleColumns)
visibleColumns - The number of columns that should be visible in the
HTML input form.public java.lang.String getHTMLInputForm(java.lang.String prefix)
getHTMLInputForm in class Parameterprefix - The prefix that should be placed in front of the parameter
name as the name of the form element.
public void htmlInputFormToValue(java.lang.String[] values)
throws InvalidValueException
htmlInputFormToValue in class Parametervalues - The value(s) submitted for this parameter.
InvalidValueException - If the specified value is not acceptable
for this parameter.public java.lang.Object clone()
clone in class Parameter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||