Examples of immutable()


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

      double monthYears = getTimeSystem().calculateYears( actualMonthBegin, actualMonthEnd );
      double monthDays = getTimeSystem().calculateDays( actualMonthBegin, actualMonthEnd );
      double monthRate = getInterestRateProvider().getRate( actualMonthBegin );

      //add the rent for the rent
      Money baseForMonth = rentSummer.immutable();

      Money compoundInterest;
      if ( getBackingCalculationSystem().isCompoundSystem() && baseForMonth.getValue() != 0 ) {
        compoundInterest = getBackingCalculationSystem().calculateInterest( baseForMonth, monthYears, monthDays, monthRate );
        rentSummer.plus( compoundInterest );
View Full Code Here

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

    Money actualValue = Money.BIG;
    while ( actualValue.abs().isGreaterThan( TARGET_DELTA ) ) {
      double change = INITIAL_RATE_GUESS / Math.pow( 2, counter );

      if ( change < MIN_CHANGE ) {
        return new PangV( actualGuess, actualValue, counter, sum.immutable() );
      }

      //modify guess
      if ( !sumPositive ^ actualValue.isGreaterThan( Money.ZERO ) ) {
        actualGuess += change;
View Full Code Here

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

      actualValue = calculateCashValue( actualGuess );
      counter++;
    }

    return new PangV( actualGuess, actualValue, counter, sum.immutable() );
  }

  /**
   * Calculates the cash value for all payments
   *
 
View Full Code Here

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

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

  /**
   * Calculates the cash value of a payment for a given rate.
   * The base for this calculation is a year with 365 days
View Full Code Here

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

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

  @NotNull
  public Period getDuration() {
    return new Period( valueDate, until );
View Full Code Here

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

      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();
  }

  /**
   * Returns the payments
   *
 
View Full Code Here

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

      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();
  }

  /**
   * Returns the payments
   *
 
View Full Code Here

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

    Money actualValue = Money.BIG;
    while ( actualValue.abs().isGreaterThan( TARGET_DELTA ) ) {
      double change = INITIAL_RATE_GUESS / Math.pow( 2, counter );

      if ( change < MIN_CHANGE ) {
        return new PangV( actualGuess, actualValue, counter, sum.immutable() );
      }

      //modify guess
      if ( !sumPositive ^ actualValue.isGreaterThan( Money.ZERO ) ) {
        actualGuess += change;
View Full Code Here

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

      actualValue = calculateCashValue( actualGuess );
      counter++;
    }

    return new PangV( actualGuess, actualValue, counter, sum.immutable() );
  }

  /**
   * Calculates the cash value for all payments
   *
 
View Full Code Here

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

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

  /**
   * Calculates the cash value of a payment for a given rate.
   * The base for this calculation is a year with 365 days
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.