operator * method
Implementation
FhirPathQuantity operator *(Object o) {
if (o is! FhirPathQuantity) {
throw primitives.InvalidTypes<FhirPathQuantity>(
'A * operator was attemped with an object that was not a FhirPathQuantity: '
'instead this was passed $o which is a type ${o.runtimeType}');
} else if (unit == o.unit) {
final value = amount * o.amount;
return FhirPathQuantity(value, unit);
} else {
// TODO(Dokotela): Should work on being able to multiply these values
throw primitives.InvalidTypes<FhirPathQuantity>(
'A * operator was attemped with an object that was not a FhirPathQuantity: '
'instead this was passed $o which is a type ${o.runtimeType}');
}
}