public static WithdrawTransferLeg registerForOn(double value, ReceptiveAccount fromAccount, Transfer transfer)
        {
            WithdrawTransferLeg deposit = new WithdrawTransferLeg(transfer);

            fromAccount.register(deposit);
            return(deposit);
        }
Example #2
0
        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);
        }