|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.referencing.wkt.Formattable org.geotools.parameter.AbstractParameter org.geotools.parameter.FloatParameter
A parameter value as a floating point (double precision) number.
This class provides the same functionalities than Parameter
, except that:
Double
objects.
DefaultParameterDescriptor
,
ParameterGroup
,
Serialized FormConstructor Summary | |
FloatParameter(org.opengis.parameter.ParameterDescriptor descriptor)
Constructs a parameter from the specified descriptor. |
|
FloatParameter(org.opengis.parameter.ParameterDescriptor descriptor,
double value)
Constructs a parameter from the specified descriptor and value. |
Method Summary | |
boolean |
booleanValue()
Returns if the value is different from 0, otherwise. |
double |
doubleValue()
Returns the numeric value of the coordinate operation parameter with its associated unit of measure. |
double |
doubleValue(javax.units.Unit unit)
Returns the numeric value of the coordinate operation parameter in the specified unit of measure. |
double[] |
doubleValueList()
Wraps the value in an array of length 1. |
double[] |
doubleValueList(javax.units.Unit unit)
Wraps the value in an array of length 1. |
boolean |
equals(java.lang.Object object)
Compares the specified object with this parameter for equality. |
javax.units.Unit |
getUnit()
Returns the unit of measure of the parameter value. |
java.lang.Object |
getValue()
Returns the parameter value as { Double , |
int |
hashCode()
Returns a hash value for this parameter. |
int |
intValue()
Returns the numeric value rounded to the nearest integer. |
int[] |
intValueList()
Wraps the value in an array of length 1. |
void |
setValue(boolean value)
Set the parameter value as a boolean. |
void |
setValue(double value)
Set the parameter value as a floating point. |
void |
setValue(double[] values,
javax.units.Unit unit)
Always throws an exception, since this parameter is not an array. |
void |
setValue(double value,
javax.units.Unit unit)
Set the parameter value as a floating point and its associated unit. |
void |
setValue(int value)
Set the parameter value as an integer. |
void |
setValue(java.lang.Object value)
Set the parameter value as a Double object. |
java.lang.String |
stringValue()
Returns the string representation of the value. |
java.net.URI |
valueFile()
Always throws an exception, since this parameter is not an URI. |
Methods inherited from class org.geotools.parameter.AbstractParameter |
clone, formatWKT, getDescriptor, toString, write |
Methods inherited from class org.geotools.referencing.wkt.Formattable |
toWKT, toWKT, toWKT |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.opengis.parameter.ParameterValue |
clone |
Methods inherited from interface org.opengis.parameter.GeneralParameterValue |
getDescriptor |
Constructor Detail |
public FloatParameter(org.opengis.parameter.ParameterDescriptor descriptor)
Double.class
.
descriptor
- The abstract definition of this parameter.
java.lang.IllegalArgumentException
- if the value class is not .public FloatParameter(org.opengis.parameter.ParameterDescriptor descriptor, double value)
setValue(double)
.
descriptor
- The abstract definition of this parameter.value
- The parameter value.
java.lang.IllegalArgumentException
- if the value class is not .Method Detail |
public javax.units.Unit getUnit()
ParameterDescriptor.getUnit()
.
getUnit
in interface org.opengis.parameter.ParameterValue
public double doubleValue(javax.units.Unit unit) throws java.lang.IllegalArgumentException
doubleValue
in interface org.opengis.parameter.ParameterValue
unit
- The unit of measure for the value to be returned.
java.lang.IllegalArgumentException
- if the specified unit is invalid for this parameter.public double doubleValue()
doubleValue
in interface org.opengis.parameter.ParameterValue
public int intValue()
intValue
in interface org.opengis.parameter.ParameterValue
public boolean booleanValue()
booleanValue
in interface org.opengis.parameter.ParameterValue
public java.lang.String stringValue()
stringValue
in interface org.opengis.parameter.ParameterValue
public double[] doubleValueList(javax.units.Unit unit) throws java.lang.IllegalArgumentException
doubleValueList
in interface org.opengis.parameter.ParameterValue
unit
- The unit of measure for the value to be returned.
java.lang.IllegalArgumentException
- if the specified unit is invalid for this parameter.public double[] doubleValueList()
doubleValueList
in interface org.opengis.parameter.ParameterValue
public int[] intValueList()
intValueList
in interface org.opengis.parameter.ParameterValue
public java.net.URI valueFile() throws org.opengis.parameter.InvalidParameterTypeException
valueFile
in interface org.opengis.parameter.ParameterValue
org.opengis.parameter.InvalidParameterTypeException
- The value is not a reference to a file or an URI.public java.lang.Object getValue()
Double
,
getValue
in interface org.opengis.parameter.ParameterValue
public void setValue(double value, javax.units.Unit unit) throws org.opengis.parameter.InvalidParameterValueException
setValue
in interface org.opengis.parameter.ParameterValue
value
- The parameter value.unit
- The unit for the specified value.
org.opengis.parameter.InvalidParameterValueException
- if the value is illegal for some reason
(for example a value out of range).public void setValue(double value) throws org.opengis.parameter.InvalidParameterValueException
setValue
in interface org.opengis.parameter.ParameterValue
value
- The parameter value.
org.opengis.parameter.InvalidParameterValueException
- if the value is illegal for some reason
(for example a value out of range).public void setValue(int value) throws org.opengis.parameter.InvalidParameterValueException
setValue
in interface org.opengis.parameter.ParameterValue
value
- The parameter value.
org.opengis.parameter.InvalidParameterValueException
- if the value is illegal for some reason
(for example a value out of range).public void setValue(boolean value) throws org.opengis.parameter.InvalidParameterValueException
setValue
in interface org.opengis.parameter.ParameterValue
value
- The parameter value.
org.opengis.parameter.InvalidParameterValueException
- if the boolean type is inappropriate for this parameter.public void setValue(java.lang.Object value) throws org.opengis.parameter.InvalidParameterValueException
Double
object.
setValue
in interface org.opengis.parameter.ParameterValue
value
- The parameter value.
org.opengis.parameter.InvalidParameterValueException
- if the type of is inappropriate
for this parameter, or if the value is illegal for some other reason (for example
the value is numeric and out of range).public void setValue(double[] values, javax.units.Unit unit) throws org.opengis.parameter.InvalidParameterValueException
setValue
in interface org.opengis.parameter.ParameterValue
org.opengis.parameter.InvalidParameterValueException
public boolean equals(java.lang.Object object)
equals
in class AbstractParameter
object
- The object to compare to .
public int hashCode()
hashCode
in class AbstractParameter
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |