Because of usage of parameterized types, expressions like:
need to replace the constructor call by a call to the static method factory:NumberRange range = new NumberRange(lower, upper);
The <Integer> declaration is optional but recommanded, and may need to be changed to <Double> or other types depending on the type of the lower and upper arguments.NumberRange<Integer> range = NumberRange.create(lower, upper);
Because of usage of parameterized types, expressions like:
need an explicit declaration of the value class, as below. It is usually just a matter of adding something like String.class in the arguments.ParameterDescriptor descriptor = new DefaultParameterDescriptor(name, validValues, defaultValue);
ParameterDescriptor descriptor = new DefaultParameterDescriptor(name, valueClass, validValues, defaultValue);
Because of the removal of deprecated methods, expressions like:
need to replace the call to the ReferencingFactoryContainer method by a call to the same method in CRSFactory:ReferencingFactoryContainer factories = ... ProjectedCRS crs = factories.createProjectedCRS(properties, geographicCRS, conversion, cartesianCS);
CRSFactory factory = factories.getCRSFactory(); // Note: an alternative is to use FactoryFinder. ProjectedCRS crs = factory.createProjectedCRS(properties, geographicCRS, conversion, cartesianCS);
Because of the removal of deprecated methods, expressions like:
need to bundle the method and transform arguments in an DefiningConversion object:ProjectedCRS crs = new DefaultProjectedCRS(properties, geographicCRS, method, transform, cartesianCS);
The same applies to constructions using a ParameterValueGroup argument instead than MathTransform, or to constructions performed with the ReferencingFactoryContainer.createProjectedCRS overloaded method, or to constructions performed with the CRSFactory and CoordinateOperationFactory interfaces.Conversion conversion = new DefiningConversion("my conversion", method, transform); ProjectedCRS crs = new DefaultProjectedCRS(properties, geographicCRS, conversion, cartesianCS);