decode static method

Implementation

static XdrAccountMergeResultCode decode(XdrDataInputStream stream) {
  int value = stream.readInt();
  switch (value) {
    case 0:
      return ACCOUNT_MERGE_SUCCESS;
    case -1:
      return ACCOUNT_MERGE_MALFORMED;
    case -2:
      return ACCOUNT_MERGE_NO_ACCOUNT;
    case -3:
      return ACCOUNT_MERGE_IMMUTABLE_SET;
    case -4:
      return ACCOUNT_MERGE_HAS_SUB_ENTRIES;
    case -5:
      return ACCOUNT_MERGE_SEQNUM_TOO_FAR;
    case -6:
      return ACCOUNT_MERGE_DEST_FULL;
    case -7:
      return ACCOUNT_MERGE_IS_SPONSOR;
    default:
      throw Exception("Unknown enum value: $value");
  }
}