Define Map interface instead of implementation

This commit is contained in:
nicksavers 2014-08-01 20:28:34 +02:00
parent d932294c0c
commit f4bab10327
1 changed files with 4 additions and 3 deletions

View File

@ -21,6 +21,7 @@ import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* The Wallet handles the management of accounts with addresses and private keys. * The Wallet handles the management of accounts with addresses and private keys.
@ -33,12 +34,12 @@ public class Wallet {
// private HashMap<Address, BigInteger> rows = new HashMap<>(); // private HashMap<Address, BigInteger> rows = new HashMap<>();
// <address, info> table for a wallet // <address, info> table for a wallet
private HashMap<String, Account> rows = new HashMap<String, Account>(); private Map<String, Account> rows = new HashMap<>();
private long high; private long high;
private List<WalletListener> listeners = new ArrayList<WalletListener>(); private List<WalletListener> listeners = new ArrayList<>();
private HashMap<BigInteger, Transaction> transactionMap = new HashMap<BigInteger, Transaction>(); private Map<BigInteger, Transaction> transactionMap = new HashMap<>();
public void addNewAccount() { public void addNewAccount() {
Account account = new Account(); Account account = new Account();