toComparator method

Comparator toComparator()

Implementation

Comparator toComparator() {
  switch (this) {
    case 'EQUALS':
      return Comparator.equals;
    case 'GREATER_THAN':
      return Comparator.greaterThan;
    case 'LESS_THAN':
      return Comparator.lessThan;
    case 'GREATER_THAN_EQUALS':
      return Comparator.greaterThanEquals;
    case 'LESS_THAN_EQUALS':
      return Comparator.lessThanEquals;
  }
  throw Exception('$this is not known in enum Comparator');
}