public static DepositTransferLeg registerForOn(double value, ReceptiveAccount toAccount, Transfer transfer) { DepositTransferLeg deposit = new DepositTransferLeg(transfer); toAccount.register(deposit); return(deposit); }
public static Transfer registerFor(double value, ReceptiveAccount fromAccount, ReceptiveAccount toAccount) { Transfer transfer = new Transfer(value, fromAccount, toAccount); transfer._withdrawTransferLeg = WithdrawTransferLeg.registerForOn(value, fromAccount, transfer); transfer._depositTransferLeg = DepositTransferLeg.registerForOn(value, toAccount, transfer); return(transfer); }