toPositionalConstraint method

PositionalConstraint toPositionalConstraint()

Implementation

PositionalConstraint toPositionalConstraint() {
  switch (this) {
    case 'EXACTLY':
      return PositionalConstraint.exactly;
    case 'STARTS_WITH':
      return PositionalConstraint.startsWith;
    case 'ENDS_WITH':
      return PositionalConstraint.endsWith;
    case 'CONTAINS':
      return PositionalConstraint.contains;
    case 'CONTAINS_WORD':
      return PositionalConstraint.containsWord;
  }
  throw Exception('$this is not known in enum PositionalConstraint');
}