// Find new transfers
List<Transfer> newTransfers = new ArrayList<Transfer>();
for (Transaction transaction : transactions) {
if (transferHistory.get(transaction.getId()) == null) {
if (transaction.getClass().equals(SecuritiesTransfer.class)) {
SecuritiesTransfer securitiesTransfer = (SecuritiesTransfer)transaction;
Transfer transfer = new Transfer(
securitiesTransfer.getId(),
securitiesTransfer.getAccount().getName(),
securitiesTransfer.getSymbol(),
securitiesTransfer.getQuantity());
transferHistory.put(transfer.id, transfer);
newTransfers.add(transfer);
}
}
}