operator == method

  1. @override
bool operator ==(
  1. dynamic obj
)
override

Two units are considered equal if their conversions to MKS are equal and they have the same singular name.

Implementation

@override
bool operator ==(dynamic obj) {
  if (identical(this, obj)) return true;

  if (obj is Units) {
    return singular == obj.singular && convToMKS == obj.convToMKS;
  }
  return false;
}