T
- The type of parameter values.@UML(identifier="CC_ParameterValue", specification=ISO_19111) public interface ParameterValue<T> extends GeneralParameterValue
getValue().getClass()
idiom. The getValue()
and setValue(Object)
methods can be invoked at any time. Others getters and
setters are parameter-type dependents.ParameterDescriptor
,
ParameterValueGroup
Modifier and Type | Method and Description |
---|---|
boolean |
booleanValue()
Returns the boolean value of an operation parameter A boolean value does not have an
associated unit of measure.
|
ParameterValue |
clone()
Returns a copy of this parameter value.
|
double |
doubleValue()
Returns the numeric value of the coordinate operation parameter with its associated
unit of measure.
|
double |
doubleValue(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.
|
ParameterDescriptor<T> |
getDescriptor()
Returns the abstract definition of this parameter value.
|
Unit<?> |
getUnit()
Returns the unit of measure of the parameter value.
|
T |
getValue()
Returns the parameter value as an object.
|
int |
intValue()
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.
|
void |
setValue(boolean value)
Set the parameter value as a boolean.
|
void |
setValue(double value)
Sets the parameter value as a floating point.
|
void |
setValue(double[] values,
Unit<?> unit)
Sets the parameter value as an array of floating point and their associated unit.
|
void |
setValue(double value,
Unit<?> unit)
Sets the parameter value as a floating point and its associated unit.
|
void |
setValue(int value)
Set the parameter value as an integer.
|
void |
setValue(Object value)
Set the parameter value as an object.
|
String |
stringValue()
Returns the string value of an operation parameter.
|
URI |
valueFile()
Returns a reference to a file or a part of a file containing one or more parameter values.
|
ParameterDescriptor<T> getDescriptor()
getDescriptor
in interface GeneralParameterValue
Unit<?> getUnit()
String
type), then this
method returns null
. Note that "no unit" doesn't means "dimensionless".doubleValue()
,
doubleValueList(javax.measure.Unit<?>)
,
getValue()
double doubleValue(Unit<?> unit) throws InvalidParameterTypeException
unit
- The unit of measure for the value to be returned.double
and conversion to unit
.InvalidParameterTypeException
- if the value is not a numeric type.IllegalArgumentException
- if the specified unit is invalid for this parameter.getUnit()
,
setValue(double,Unit)
,
doubleValueList(Unit)
@UML(identifier="value", obligation=CONDITIONAL, specification=ISO_19111) double doubleValue() throws InvalidParameterTypeException
double
.InvalidParameterTypeException
- if the value is not a numeric type.getUnit()
,
setValue(double)
,
doubleValueList(javax.measure.Unit<?>)
@UML(identifier="integerValue", obligation=CONDITIONAL, specification=ISO_19111) int intValue() throws InvalidParameterTypeException
int
.InvalidParameterTypeException
- if the value is not an integer type.setValue(int)
,
intValueList()
@UML(identifier="booleanValue", obligation=CONDITIONAL, specification=ISO_19111) boolean booleanValue() throws InvalidParameterTypeException
InvalidParameterTypeException
- if the value is not a boolean type.setValue(boolean)
@UML(identifier="stringValue", obligation=CONDITIONAL, specification=ISO_19111) String stringValue() throws InvalidParameterTypeException
InvalidParameterTypeException
- if the value is not a string.getValue()
,
setValue(Object)
double[] doubleValueList(Unit<?> unit) throws InvalidParameterTypeException
unit
- The unit of measure for the value to be returned.double
and conversion to unit
.InvalidParameterTypeException
- if the value is not an array of double
s.IllegalArgumentException
- if the specified unit is invalid for this parameter.getUnit()
,
setValue(double[],Unit)
,
doubleValue(Unit)
@UML(identifier="valueList", obligation=CONDITIONAL, specification=ISO_19111) double[] doubleValueList() throws InvalidParameterTypeException
InvalidParameterTypeException
- if the value is not an array of double
s.getUnit()
,
setValue(Object)
,
doubleValue()
@UML(identifier="integerValueList", obligation=CONDITIONAL, specification=ISO_19111) int[] intValueList() throws InvalidParameterTypeException
InvalidParameterTypeException
- if the value is not an array of int
s.setValue(Object)
,
intValue()
@UML(identifier="valueFile", obligation=CONDITIONAL, specification=ISO_19111) URI valueFile() throws InvalidParameterTypeException
InvalidParameterTypeException
- if the value is not a reference to a file or an URI.getValue()
,
setValue(Object)
@UML(identifier="value", obligation=CONDITIONAL, specification=ISO_19111) T getValue()
Double
,
Integer
, Boolean
, String
, URI
, double[]
or int[]
.setValue(Object)
void setValue(double[] values, Unit<?> unit) throws InvalidParameterValueException
values
- The parameter values.unit
- The unit for the specified value.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).void setValue(double value, Unit<?> unit) throws InvalidParameterValueException
value
- The parameter value.unit
- The unit for the specified value.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(double)
,
doubleValue(Unit)
void setValue(double value) throws InvalidParameterValueException
value
- The parameter value.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(double,Unit)
,
doubleValue()
void setValue(int value) throws InvalidParameterValueException
value
- The parameter value.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).intValue()
void setValue(boolean value) throws InvalidParameterValueException
value
- The parameter value.InvalidParameterValueException
- if the boolean type is inappropriate for this
parameter.booleanValue()
void setValue(Object value) throws InvalidParameterValueException
Double
, Integer
, Boolean
, String
, URI
, double[]
or int[]
.
The argument is not restricted to the parameterized type T
because the type is
typically unknown (as in group.parameter("name").setValue(value)
) and because some
implementations may choose to convert a wider range of types.
value
- The parameter value.InvalidParameterValueException
- if the type of value
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).getValue()
ParameterValue clone()
clone
in interface GeneralParameterValue
Object.clone()
Copyright © 1996–2019 Geotools. All rights reserved.