operator < method Null safety

bool operator <(
  1. FhirPathQuantity o
)

Implementation

bool operator <(FhirPathQuantity o) {
  if (!stringEquality(o.unit)) {
    throw FhirPathEvaluationException(
        'The units on these two quantities are not the same and'
        ' this version of FHIRPath does not currently support unit conversion'
        'Quantity1: ${toString()}]\n'
        'Quantity2: ${o.toString()}]');
  }
  return amount < o.amount;
}