import com.fasterxml.jackson.databind.MappingIterator;
import net.ktnx.mobileledger.async.RetrieveTransactionsTask;
-import net.ktnx.mobileledger.async.SendTransactionTask;
import net.ktnx.mobileledger.model.LedgerAccount;
import java.io.IOException;
abstract public class AccountListParser {
protected MappingIterator<net.ktnx.mobileledger.json.ParsedLedgerAccount> iterator;
- public static AccountListParser forApiVersion(SendTransactionTask.API version,
- InputStream input) throws IOException {
+ public static AccountListParser forApiVersion(API version, InputStream input)
+ throws IOException {
switch (version) {
case v1_14:
return new net.ktnx.mobileledger.json.v1_14.AccountListParser(input);
return new net.ktnx.mobileledger.json.v1_15.AccountListParser(input);
case v1_19_1:
return new net.ktnx.mobileledger.json.v1_19_1.AccountListParser(input);
+ case v1_23:
+ return new net.ktnx.mobileledger.json.v1_23.AccountListParser(input);
default:
throw new RuntimeException("Unsupported version " + version.toString());
}
}
- public abstract SendTransactionTask.API getApiVersion();
+ public abstract API getApiVersion();
public LedgerAccount nextAccount(RetrieveTransactionsTask task,
HashMap<String, LedgerAccount> map) {
if (!iterator.hasNext())