org.opengis.parameter
Interface ParameterValue
-
- All Superinterfaces:
- java.lang.Cloneable, GeneralParameterValue
@UML(identifier="CC_ParameterValue", specification=ISO_19111) public interface ParameterValue extends GeneralParameterValue
A parameter value used by an operation method. Most parameter values are numeric, but other types of parameter values are possible. The parameter type can be fetch with thegetValue().getClass()idiom. ThegetValue()andsetValue(Object)methods can be invoked at any time. Others getters and setters are parameter-type dependents.- Since:
- GeoAPI 1.0
- See Also:
ParameterDescriptor,ParameterValueGroup
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description booleanbooleanValue()Returns the boolean value of an operation parameter A boolean value does not have an associated unit of measure.java.lang.Objectclone()Returns a copy of this parameter value.doubledoubleValue()Returns the numeric value of the coordinate operation parameter with its associated unit of measure.doubledoubleValue(Unit unit)Returns the numeric value of the coordinate operation parameter in the specified unit of measure.double[]doubleValueList()Returns an ordered sequence of two or more numeric values of an operation parameter list, where each value has the same associated unit of measure.double[]doubleValueList(Unit unit)Returns an ordered sequence of numeric values in the specified unit of measure.UnitgetUnit()Returns the unit of measure of the parameter value.java.lang.ObjectgetValue()Returns the parameter value as an object.intintValue()Returns the positive integer value of an operation parameter, usually used for a count.int[]intValueList()Returns an ordered sequence of two or more integer values of an operation parameter list, usually used for counts.voidsetValue(boolean value)Set the parameter value as a boolean.voidsetValue(double value)Set the parameter value as a floating point.voidsetValue(double[] values, Unit unit)Set the parameter value as an array of floating point and their associated unit.voidsetValue(double value, Unit unit)Set the parameter value as a floating point and its associated unit.voidsetValue(int value)Set the parameter value as an integer.voidsetValue(java.lang.Object value)Set the parameter value as an object.java.lang.StringstringValue()Returns the string value of an operation parameter.java.net.URIvalueFile()Returns a reference to a file or a part of a file containing one or more parameter values.-
Methods inherited from interface org.opengis.parameter.GeneralParameterValue
getDescriptor
-
-
-
-
Method Detail
-
getUnit
Unit getUnit()
Returns the unit of measure of the parameter value. If the parameter value has no unit (for example because it is aStringtype), then this method returnsnull. Note that "no unit" doesn't means "dimensionless".- See Also:
doubleValue(),doubleValueList(Unit),getValue()
-
doubleValue
double doubleValue(Unit unit) throws InvalidParameterTypeExceptionReturns the numeric value of the coordinate operation parameter in the specified unit of measure. This convenience method apply unit conversion on the fly as needed.- Parameters:
unit- The unit of measure for the value to be returned.- Returns:
- The numeric value represented by this parameter after conversion to type
doubleand conversion tounit. - Throws:
InvalidParameterTypeException- if the value is not a numeric type.java.lang.IllegalArgumentException- if the specified unit is invalid for this parameter.- See Also:
getUnit(),setValue(double,Unit),doubleValueList(Unit)
-
doubleValue
@UML(identifier="value", obligation=CONDITIONAL, specification=ISO_19111) double doubleValue() throws InvalidParameterTypeException
Returns the numeric value of the coordinate operation parameter with its associated unit of measure.- Returns:
- The numeric value represented by this parameter after conversion to type
double. - Throws:
InvalidParameterTypeException- if the value is not a numeric type.- See Also:
getUnit(),setValue(double),doubleValueList(Unit)
-
intValue
@UML(identifier="integerValue", obligation=CONDITIONAL, specification=ISO_19111) int intValue() throws InvalidParameterTypeException
Returns the positive integer value of an operation parameter, usually used for a count. An integer value does not have an associated unit of measure.- Returns:
- The numeric value represented by this parameter after conversion to type
int. - Throws:
InvalidParameterTypeException- if the value is not an integer type.- See Also:
setValue(int),intValueList()
-
booleanValue
@UML(identifier="booleanValue", obligation=CONDITIONAL, specification=ISO_19111) boolean booleanValue() throws InvalidParameterTypeException
Returns the boolean value of an operation parameter A boolean value does not have an associated unit of measure.- Returns:
- The boolean value represented by this parameter.
- Throws:
InvalidParameterTypeException- if the value is not a boolean type.- See Also:
setValue(boolean)
-
stringValue
@UML(identifier="stringValue", obligation=CONDITIONAL, specification=ISO_19111) java.lang.String stringValue() throws InvalidParameterTypeException
Returns the string value of an operation parameter. A string value does not have an associated unit of measure.- Returns:
- The string value represented by this parameter.
- Throws:
InvalidParameterTypeException- if the value is not a string.- See Also:
getValue(),setValue(Object)
-
doubleValueList
double[] doubleValueList(Unit unit) throws InvalidParameterTypeExceptionReturns an ordered sequence of numeric values in the specified unit of measure. This convenience method apply unit conversion on the fly as needed.- Parameters:
unit- The unit of measure for the value to be returned.- Returns:
- The sequence of values represented by this parameter after conversion to type
doubleand conversion tounit. - Throws:
InvalidParameterTypeException- if the value is not an array ofdoubles.java.lang.IllegalArgumentException- if the specified unit is invalid for this parameter.- See Also:
getUnit(),setValue(double[],Unit),doubleValue(Unit)
-
doubleValueList
@UML(identifier="valueList", obligation=CONDITIONAL, specification=ISO_19111) double[] doubleValueList() throws InvalidParameterTypeException
Returns an ordered sequence of two or more numeric values of an operation parameter list, where each value has the same associated unit of measure.- Returns:
- The sequence of values represented by this parameter.
- Throws:
InvalidParameterTypeException- if the value is not an array ofdoubles.- See Also:
getUnit(),setValue(Object),doubleValue()
-
intValueList
@UML(identifier="integerValueList", obligation=CONDITIONAL, specification=ISO_19111) int[] intValueList() throws InvalidParameterTypeException
Returns an ordered sequence of two or more integer values of an operation parameter list, usually used for counts. These integer values do not have an associated unit of measure.- Returns:
- The sequence of values represented by this parameter.
- Throws:
InvalidParameterTypeException- if the value is not an array ofints.- See Also:
setValue(Object),intValue()
-
valueFile
@UML(identifier="valueFile", obligation=CONDITIONAL, specification=ISO_19111) java.net.URI valueFile() throws InvalidParameterTypeException
Returns a reference to a file or a part of a file containing one or more parameter values. When referencing a part of a file, that file must contain multiple identified parts, such as an XML encoded document. Furthermore, the referenced file or part of a file can reference another part of the same or different files, as allowed in XML documents.- Returns:
- The reference to a file containing parameter values.
- Throws:
InvalidParameterTypeException- if the value is not a reference to a file or an URI.- See Also:
getValue(),setValue(Object)
-
getValue
@UML(identifier="value", obligation=CONDITIONAL, specification=ISO_19111) java.lang.Object getValue()
Returns the parameter value as an object. The object type is typically aDouble,Integer,Boolean,String,URI,double[]orint[].- Returns:
- The parameter value as an object.
- See Also:
setValue(Object)
-
setValue
void setValue(double[] values, Unit unit) throws InvalidParameterValueExceptionSet the parameter value as an array of floating point and their associated unit.- Parameters:
values- The parameter values.unit- The unit for the specified value.- Throws:
InvalidParameterValueException- if the floating point type is inappropriate for this parameter, or if the value is illegal for some other reason (for example a value out of range).
-
setValue
void setValue(double value, Unit unit) throws InvalidParameterValueExceptionSet the parameter value as a floating point and its associated unit.- Parameters:
value- The parameter value.unit- The unit for the specified value.- Throws:
InvalidParameterValueException- if the floating point type is inappropriate for this parameter, or if the value is illegal for some other reason (for example a value out of range).- See Also:
setValue(double),doubleValue(Unit)
-
setValue
void setValue(double value) throws InvalidParameterValueExceptionSet the parameter value as a floating point.- Parameters:
value- The parameter value.- Throws:
InvalidParameterValueException- if the floating point type is inappropriate for this parameter, or if the value is illegal for some other reason (for example a value out of range).- See Also:
setValue(double,Unit),doubleValue()
-
setValue
void setValue(int value) throws InvalidParameterValueExceptionSet the parameter value as an integer.- Parameters:
value- The parameter value.- Throws:
InvalidParameterValueException- if the integer type is inappropriate for this parameter, or if the value is illegal for some other reason (for example a value out of range).- See Also:
intValue()
-
setValue
void setValue(boolean value) throws InvalidParameterValueExceptionSet the parameter value as a boolean.- Parameters:
value- The parameter value.- Throws:
InvalidParameterValueException- if the boolean type is inappropriate for this parameter.- See Also:
booleanValue()
-
setValue
void setValue(java.lang.Object value) throws InvalidParameterValueExceptionSet the parameter value as an object. The object type is typically aDouble,Integer,Boolean,String,URI,double[]orint[].- Parameters:
value- The parameter value.- Throws:
InvalidParameterValueException- if the type ofvalueis inappropriate for this parameter, or if the value is illegal for some other reason (for example the value is numeric and out of range).- See Also:
getValue()
-
clone
java.lang.Object clone()
Returns a copy of this parameter value.- Specified by:
clonein interfaceGeneralParameterValue- Returns:
- A copy of this parameter value.
- See Also:
Object.clone()
-
-
DataMelt 3.0 © DataMelt by jWork.ORG