final ParameterValueGroup groups = (ParameterValueGroup) descriptor.createValue();
copy((ParameterValueGroup) value, groups);
values.groups(name).add(groups);
continue;
} else {
throw new InvalidParameterNameException(Errors.format(
ErrorKeys.UNEXPECTED_PARAMETER_$1, name), name);
}
}
/*
* Single parameter - copy the value, with special care for value with units.
*/
final ParameterValue<?> source = (ParameterValue) value;
final ParameterValue<?> target;
try {
target = copy.parameter(name);
} catch (ParameterNotFoundException cause) {
final InvalidParameterNameException exception =
new InvalidParameterNameException(Errors.format(
ErrorKeys.UNEXPECTED_PARAMETER_$1, name), name);
exception.initCause(cause);
throw exception;
}
final Object v = source.getValue();
final Unit<?> unit = source.getUnit();
if (unit == null) {