toComparisonOperator method

ComparisonOperator toComparisonOperator()

Implementation

ComparisonOperator toComparisonOperator() {
  switch (this) {
    case 'GreaterThanOrEqualToThreshold':
      return ComparisonOperator.greaterThanOrEqualToThreshold;
    case 'GreaterThanThreshold':
      return ComparisonOperator.greaterThanThreshold;
    case 'LessThanThreshold':
      return ComparisonOperator.lessThanThreshold;
    case 'LessThanOrEqualToThreshold':
      return ComparisonOperator.lessThanOrEqualToThreshold;
    case 'LessThanLowerOrGreaterThanUpperThreshold':
      return ComparisonOperator.lessThanLowerOrGreaterThanUpperThreshold;
    case 'LessThanLowerThreshold':
      return ComparisonOperator.lessThanLowerThreshold;
    case 'GreaterThanUpperThreshold':
      return ComparisonOperator.greaterThanUpperThreshold;
  }
  throw Exception('$this is not known in enum ComparisonOperator');
}