The Range class has a NumberRange subclass for the special case of Number values, which itself has a MeasurementRange subclass for numbers with a unit of measurement. We would like an AngleRange subclass of Range for Angle values with units fixed to degrees (the units used by the existing Angle). We can not use NumberRange for this purpose because Angle does not extend Number (we could modify Angle class, but extending Number has proven to be source of confusion in the past).
More specifically the work to do would be:
- Creates class AngleRange extends Range.
- Override unit() with a hard-coded NonSI.DEGREE_ANGLE return value.
- Consider making the unit() method a public one. If this change is applied, search for Measurement.unit() usage and see if we should replace them by Range.unit().
- Add createLongitude and createLatitude convenience methods in ParameterBuilder.
- Modify the DefaultParameterDescriptorGroup, ParameterBuilder and ParameterFormat examples in javadoc for making use of angular values in Latitude of natural origin and Longitude of natural origin parameters.