@Status(stage=DEVELOPMENT, unitTests=COMPLETE) @Review(by="Kees Schotanus", at="2009-10-10") @ThreadSafety(level=IMMUTABLE, doc="Utility class with only static methods") public final class Finance extends Object
| Modifier and Type | Field and Description |
|---|---|
static double |
DECIMAL_INTEREST_RATE
Constant to compute the decimal interest rate (perunage in Dutch) from a
percentage.
|
| Modifier and Type | Method and Description |
|---|---|
static double |
futureValue(double presentValue,
double interest,
int years)
Computes the future value of a starting capital (present value) for which
compound interest will be received annually.
|
static double |
futureValue(double presentValue,
double interest,
int interestPaymentsPerPeriod,
double periods)
Computes the future value of a starting capital (present value) for which
compound interest will be received interestPaymentsPerPeriod times per
period for the duration of the supplied periods.
|
static double |
presentValue(double futureValue,
double interest,
int years)
Computes the present value of a future capital (future value) for which
compound interest will be received annually.
|
static double |
presentValue(double futureValue,
double interest,
int interestPaymentsPerPeriod,
double periods)
Computes the present value of a future capital (future value) for which
compound interest will be received interestPaymentsPerPeriod times per
period for the duration of the supplied periods.
|
public static final double DECIMAL_INTEREST_RATE
public static double futureValue(double presentValue,
double interest,
int years)
presentValue - The present value.interest - The interest percentage per year.
years - The number of years.public static double futureValue(double presentValue,
double interest,
int interestPaymentsPerPeriod,
double periods)
Financial.futureValue(1000.0D, 7.0D, 4, 1.5);
Which is approximately: $1109.70presentValue - The present value.interest - The interest rate per period.
interestPaymentsPerPeriod - The number of times interest is payed
per period.
periods - The number of periods.IllegalArgumentException - When the supplied
interestPaymentsPerPeriod is 0.public static double presentValue(double futureValue,
double interest,
int years)
futureValue - The future value.interest - The interest rate per year.
years - The number of years.public static double presentValue(double futureValue,
double interest,
int interestPaymentsPerPeriod,
double periods)
Financial.presentValue(1000.0D, 7.0D, 4, 1.5);
Which is approximately: $901.14futureValue - The future value.interest - The interest percentage per period.
interestPaymentsPerPeriod - The number of times interest is payed
per period.
periods - The number of periods.IllegalArgumentException - When the supplied
interestPaymentsPerPeriod is 0.Copyright © 2008–2017. All rights reserved.