Package com.cedarsoft.business

Examples of com.cedarsoft.business.MutableMoney.plus()


      Money baseForMonth = rentSummer.immutable();

      Money compoundInterest;
      if ( getBackingCalculationSystem().isCompoundSystem() && baseForMonth.getValue() != 0 ) {
        compoundInterest = getBackingCalculationSystem().calculateInterest( baseForMonth, monthYears, monthDays, monthRate );
        rentSummer.plus( compoundInterest );
      } else {
        compoundInterest = Money.ZERO;
      }

      //add the rent for the amount
View Full Code Here


        compoundInterest = Money.ZERO;
      }

      //add the rent for the amount
      Money interest = getBackingCalculationSystem().calculateInterest( amount, monthYears, monthDays, monthRate );
      rentSummer.plus( interest );

      //Build the information object (if expected)
      interestDetails.add( new InterestDetails( actualMonthBegin, actualMonthEnd, monthRate, baseForMonth, interest.plus( compoundInterest ), monthDays ) );

      //Next month --> now we really need the first day of the month
View Full Code Here

   */
  @NotNull
  public Money getPaymentsAmount() {
    MutableMoney amount = new MutableMoney();
    for ( Payment payment : payments ) {
      amount.plus( payment.getAmount() );
    }
    return amount.getMoney();
  }

  /**
 
View Full Code Here

      return PangV.NULL;
    }

    MutableMoney sum = new MutableMoney();
    for ( Payment payment : payments ) {
      sum.plus( payment.getAmount() );
    }

    boolean sumPositive = sum.getEstimatedValue() > 0;

    //test it using bisection
View Full Code Here

   */
  @NotNull
  public Money calculateCashValue( double rate ) {
    MutableMoney cashValue = new MutableMoney();
    for ( Payment payment : payments ) {
      cashValue.plus( calulateCashValue( baseDate, payment, rate ) );
    }
    return cashValue.immutable();
  }

  /**
 
View Full Code Here

    this.interestDetails = new ArrayList<InterestDetails>( interestDetails );

    //Sum up
    MutableMoney interestSummer = new MutableMoney();
    for ( InterestDetails interestDetail : interestDetails ) {
      interestSummer.plus( interestDetail.getInterest() );
    }
    this.interest = interestSummer.immutable();
  }

  @NotNull
View Full Code Here

    MutableMoney sum = new MutableMoney();

    for ( Payment payment : payments ) {
      double years = timeSystem.calculateYears( payment.getDate(), until );
      double days = timeSystem.calculateDays( payment.getDate(), until );
      sum.plus( calculationSystem.calculateInterest( payment.getAmount(), years, days, interestRate ) );
    }

    return sum.immutable();
  }
View Full Code Here

    MutableMoney sum = new MutableMoney();

    for ( Payment payment : payments ) {
      double years = timeSystem.calculateYears( payment.getDate(), until );
      double days = timeSystem.calculateDays( payment.getDate(), until );
      sum.plus( calculationSystem.calculateInterest( payment.getAmount(), years, days, interestRate ) );
    }

    return sum.immutable();
  }
View Full Code Here

   */
  @NotNull
  public Money getPaymentsAmount() {
    MutableMoney amount = new MutableMoney();
    for ( Payment payment : payments ) {
      amount.plus( payment.getAmount() );
    }
    return amount.getMoney();
  }

  /**
 
View Full Code Here

      return PangV.NULL;
    }

    MutableMoney sum = new MutableMoney();
    for ( Payment payment : payments ) {
      sum.plus( payment.getAmount() );
    }

    boolean sumPositive = sum.getEstimatedValue() > 0;

    //test it using bisection
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.