toComparator method
Implementation
Comparator toComparator() {
switch (this) {
case 'LessThan':
return Comparator.lessThan;
case 'LessThanOrEqualTo':
return Comparator.lessThanOrEqualTo;
case 'GreaterThan':
return Comparator.greaterThan;
case 'GreaterThanOrEqualTo':
return Comparator.greaterThanOrEqualTo;
case 'EqualTo':
return Comparator.equalTo;
case 'NotEqualTo':
return Comparator.notEqualTo;
case 'Exists':
return Comparator.exists;
case 'DoesNotExist':
return Comparator.doesNotExist;
case 'In':
return Comparator.$in;
case 'NotIn':
return Comparator.notIn;
}
throw Exception('$this is not known in enum Comparator');
}