Examples of immutable()


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

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

  @Nonnull
  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 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 gumi.builders.url.UrlParameterMultimap.immutable()

    @Test(expectedExceptions = UnsupportedOperationException.class)
    public void mutateImmutableParameterMap() {
        final UrlParameterMultimap m1 = UrlParameterMultimap.newMultimap();
        m1.add("a", "1").add("b", "2").add("c", "3");
        final UrlParameterMultimap.Immutable i1 = m1.immutable();
        i1.add("d", "4");
    }
   
    @Test
    public void containsKey() {
View Full Code Here

Examples of mikera.vectorz.Vector.immutable()

            int mlIdx = probabilities.maxElementIndex();

            predictions.set(e, quantizer.getIndexValue(mlIdx));
            if (distChannel != null) {
                distChannel.put(e.getKey(), probabilities.immutable());
            }
        }
    }
}
View Full Code Here

Examples of org.eclipse.core.internal.dtree.DeltaDataTree.immutable()

    }

    //make the underlying data tree immutable
    //can't call immutable() on the ElementTree because
    //this would attempt to reroot.
    delta.immutable();
    return tree;
  }

  /**
   * Reads a chain of ElementTrees from the given input stream.
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.