fromString static method

AtomicGender fromString(
  1. String value
)

Implementation

static AtomicGender fromString(String value) {
  switch (value.toLowerCase()) {
    case 'male':
    case 'm':
      return male;
    case 'female':
    case 'f':
      return female;
    case 'nonbinary':
    case 'non-binary':
    case 'nb':
      return nonBinary;
    case 'prefernottosay':
    case 'prefer not to say':
    case 'na':
    case 'n/a':
      return preferNotToSay;
    case 'other':
    case 'o':
      return other;
    default:
      return preferNotToSay;
  }
}