class AddressBookAUResultParser extends ResultParser {

  @Override
  public AddressBookParsedResult parse(Result result) {<FILL_FUNCTION_BODY>}

  private static String[] matchMultipleValuePrefix(String prefix, String rawText) {
    List<String> values = null;
    // For now, always 3, and always trim
    for (int i = 1; i <= 3; i++) {
      String value = matchSinglePrefixedField(prefix + i + ':', rawText, '\r', true);
      if (value == null) {
        break;
      }
      if (values == null) {
        values = new ArrayList<>(3); // lazy init
      }
      values.add(value);
    }
    if (values == null) {
      return null;
    }
    return values.toArray(EMPTY_STR_ARRAY);
  }

}

    String rawText = getMassagedText(result);
    // MEMORY is mandatory; seems like a decent indicator, as does end-of-record separator CR/LF
    if (!rawText.contains("MEMORY") || !rawText.contains("\r\n")) {
      return null;
    }

    // NAME1 and NAME2 have specific uses, namely written name and pronunciation, respectively.
    // Therefore we treat them specially instead of as an array of names.
    String name = matchSinglePrefixedField("NAME1:", rawText, '\r', true);
    String pronunciation = matchSinglePrefixedField("NAME2:", rawText, '\r', true);

    String[] phoneNumbers = matchMultipleValuePrefix("TEL", rawText);
    String[] emails = matchMultipleValuePrefix("MAIL", rawText);
    String note = matchSinglePrefixedField("MEMORY:", rawText, '\r', false);
    String address = matchSinglePrefixedField("ADD:", rawText, '\r', true);
    String[] addresses = address == null ? null : new String[] {address};
    return new AddressBookParsedResult(maybeWrap(name),
                                       null,
                                       pronunciation,
                                       phoneNumbers,
                                       null,
                                       emails,
                                       null,
                                       null,
                                       note,
                                       addresses,
                                       null,
                                       null,
                                       null,
                                       null,
                                       null,
                                       null);
  
<methods>public non-sealed void <init>() ,public abstract com.google.zxing.client.result.ParsedResult parse(com.google.zxing.Result) ,public static com.google.zxing.client.result.ParsedResult parseResult(com.google.zxing.Result) <variables>private static final java.util.regex.Pattern AMPERSAND,private static final java.lang.String BYTE_ORDER_MARK,private static final java.util.regex.Pattern DIGITS,static final java.lang.String[] EMPTY_STR_ARRAY,private static final java.util.regex.Pattern EQUALS,private static final com.google.zxing.client.result.ResultParser[] PARSERS