decode static method

Implementation

static XdrLedgerEntryType decode(XdrDataInputStream stream) {
  int value = stream.readInt();
  switch (value) {
    case 0:
      return ACCOUNT;
    case 1:
      return TRUSTLINE;
    case 2:
      return OFFER;
    case 3:
      return DATA;
    case 4:
      return CLAIMABLE_BALANCE;
    case 5:
      return LIQUIDITY_POOL;
    case 6:
      return CONTRACT_DATA;
    case 7:
      return CONTRACT_CODE;
    case 8:
      return CONFIG_SETTING;
    case 9:
      return TTL;
    default:
      throw Exception("Unknown enum value: $value");
  }
}