getKeyType method

String getKeyType(
  1. String keyRegex
)

Returns the key type based on a given key regex

Implementation

String getKeyType(String keyRegex) {
  if (keyRegex.contains(MixedConstants.SHARE_LOCATION)) {
    return 'Share location';
  }

  if (keyRegex.contains(MixedConstants.REQUEST_LOCATION_ACK)) {
    return 'Request location acknowledgment';
  }

  if (keyRegex.contains(MixedConstants.REQUEST_LOCATION)) {
    return 'Request location';
  }

  return '';
}