Object
Parameter
An immutable tuple for parameter name, value and unit of measurement.
This class provides a small subset of
ParameterDescriptor
and
ParameterValue
functionalities combined in a single class for simplicity.
This class serves two purposes:
- Assign parameter values to the
ParameterValueGroup
instance supplied by the implementation to test. - Verifies the parameter values declared by the
SingleOperation
instance created by the implementation to test.
ParameterValueGroup pg = mtFactory.getDefaultParameters("Oblique Stereographic");
pg.parameter("Latitude of natural origin") .setValue(52.15616056, units.degree());
pg.parameter("Longitude of natural origin") .setValue(5.387638889, units.degree());
pg.parameter("Scale factor at natural origin").setValue(0.9999079, units.one());
pg.parameter("False easting") .setValue(155000, units.metre());
pg.parameter("False northing") .setValue(463000, units.metre());
- Since:
- 1.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Compares the given object with this parameter for equality.int
hashCode()
Returns a hash code value for this parameter.void
setValueInto
(ParameterValueGroup destination) Locates the parameter namedname
in the specified group and sets its value.toString()
Returns a string representation of this parameter value.void
verify
(ParameterValueGroup parameters) Verifies that the parameter namedname
exists and has the expected value.
-
Field Details
-
name
The parameter name.- See Also:
-
-
Constructor Details
-
Parameter
Creates a new parameter of the given name and value without unit.- Parameters:
name
- the parameter name.value
- the parameter value.
-
Parameter
Creates a new parameter of the given name, value and units.- Parameters:
name
- the parameter name.value
- the parameter value.unit
- the unit of measurement, ornull
if none.
-
-
Method Details
-
setValueInto
Locates the parameter namedname
in the specified group and sets its value. This is a convenience method for GIGS tests; users normally do not need this method. The recommended pattern for setting a parameter value is simply like below:group.parameter("Latitude of 1st standard parallel").setValue(-18, units.degree());
- Parameters:
destination
- the parameter group where to copy the parameter value.- Throws:
AssertionFailedError
- if this parameter is not found in the specified group.
-
verify
Verifies that the parameter namedname
exists and has the expected value. Unit conversion are applied if needed.- Parameters:
parameters
- the group of parameters to verify.- Throws:
AssertionFailedError
- if this parameter is not found in the specified group or does not have the expected value.
-
equals
Compares the given object with this parameter for equality. -
hashCode
public int hashCode()Returns a hash code value for this parameter. -
toString
Returns a string representation of this parameter value.
-