| Package | Description |
|---|---|
| com.opengamma.strata.collect |
Root package for common data structures used by Strata.
|
| Modifier and Type | Field and Description |
|---|---|
static Decimal |
Decimal.MAX_VALUE
A decimal value representing the largest supported value.
|
static Decimal |
Decimal.MIN_VALUE
A decimal value representing the smallest supported value.
|
static Decimal |
Decimal.ZERO
A decimal value representing zero.
|
| Modifier and Type | Method and Description |
|---|---|
Decimal |
Decimal.abs()
Returns a decimal value that is positive.
|
Decimal |
FixedScaleDecimal.decimal()
Gets the underlying decimal.
|
Decimal |
Decimal.dividedBy(Decimal other)
Returns a decimal value that is equal to this value divided by the specified value.
|
Decimal |
Decimal.dividedBy(Decimal other,
RoundingMode roundingMode)
Returns a decimal value that is equal to this value divided by the specified value, with a rounding mode.
|
Decimal |
Decimal.dividedBy(double other)
Returns a decimal value that is equal to this value divided by the specified value.
|
Decimal |
Decimal.dividedBy(long other)
Returns a decimal value that is equal to this value divided by the specified value.
|
Decimal |
Decimal.mapAsBigDecimal(UnaryOperator<BigDecimal> fn)
Maps this decimal value using the maths operations of
BigDecimal. |
Decimal |
Decimal.mapAsDouble(DoubleUnaryOperator fn)
Maps this decimal value using the maths operations of
double. |
Decimal |
Decimal.minus(Decimal other)
Returns a decimal value that is equal to this value minus the specified value.
|
Decimal |
Decimal.minus(double other)
Returns a decimal value that is equal to this value minus the specified value.
|
Decimal |
Decimal.minus(long other)
Returns a decimal value that is equal to this value minus the specified value.
|
Decimal |
Decimal.movePoint(int movement)
Returns a decimal value with the decimal point moved.
|
Decimal |
Decimal.multipliedBy(Decimal other)
Returns a decimal value that is equal to this value multiplied by the specified value.
|
Decimal |
Decimal.multipliedBy(double other)
Returns a decimal value that is equal to this value multiplied by the specified value.
|
Decimal |
Decimal.multipliedBy(long other)
Returns a decimal value that is equal to this value multiplied by the specified value.
|
Decimal |
Decimal.negated()
Returns a decimal value that is negated.
|
static Decimal |
ArgChecker.notNegative(Decimal argument,
String name)
Checks that the argument is not negative.
|
static Decimal |
ArgChecker.notNegativeOrZero(Decimal argument,
String name)
Checks that the argument is not negative or zero.
|
static Decimal |
ArgChecker.notPositive(Decimal argument,
String name)
Checks that the argument is not positive.
|
static Decimal |
ArgChecker.notPositiveIfPresent(Decimal argument,
String name)
Checks that the argument is not positive if the arguement is not null.
|
static Decimal |
Decimal.of(BigDecimal value)
Obtains an instance from a
BigDecimal. |
static Decimal |
Decimal.of(double value)
Obtains an instance from a
double. |
static Decimal |
Decimal.of(long value)
Obtains an instance from a
long. |
static Decimal |
Decimal.of(String str)
Obtains an instance from a
String. |
static Decimal |
Decimal.ofScaled(long unscaled,
int scale)
Obtains an instance from an unscaled value and a scale.
|
static Decimal |
Decimal.parse(String str)
Parses an instance from a
String. |
Decimal |
Decimal.plus(Decimal other)
Returns a decimal value that is equal to this value plus the specified value.
|
Decimal |
Decimal.plus(double other)
Returns a decimal value that is equal to this value plus the specified value.
|
Decimal |
Decimal.plus(long other)
Returns a decimal value that is equal to this value plus the specified value.
|
Decimal |
Decimal.remainder(Decimal other)
Returns the remainder when dividing this value by the specified value.
|
Decimal |
Decimal.roundToPrecision(int precision,
RoundingMode roundingMode)
Returns a decimal value rounded to the specified precision.
|
Decimal |
Decimal.roundToScale(int desiredScale,
RoundingMode roundingMode)
Returns a decimal value rounded to the specified scale.
|
Decimal |
Percentage.toDecimalForm()
Converts this percentage to mathematical decimal form.
|
Decimal |
BasisPoints.toDecimalForm()
Converts this basis points to mathematical decimal form.
|
Decimal |
BasisPoints.valueBasisPoints()
Gets the value in basis points form as a
Decimal. |
Decimal |
Percentage.valuePercent()
Gets the value in percentage form as a
Decimal. |
| Modifier and Type | Method and Description |
|---|---|
int |
Decimal.compareTo(Decimal other) |
Decimal |
Decimal.dividedBy(Decimal other)
Returns a decimal value that is equal to this value divided by the specified value.
|
Decimal |
Decimal.dividedBy(Decimal other,
RoundingMode roundingMode)
Returns a decimal value that is equal to this value divided by the specified value, with a rounding mode.
|
static Percentage |
Percentage.fromDecimalForm(Decimal decimal)
Obtains an instance from mathematical decimal form, where 0.007 will create an instance representing 0.7%.
|
static BasisPoints |
BasisPoints.fromDecimalForm(Decimal decimal)
Obtains an instance from mathematical decimal form, where 0.007 will create an instance representing 70bps.
|
boolean |
Decimal.isGreaterThan(Decimal other)
States if this decimal is greater than the other decimal.
|
boolean |
Decimal.isGreaterThanEqualTo(Decimal other)
States if this decimal is greater than or equal to the other decimal.
|
boolean |
Decimal.isLessThan(Decimal other)
States if this decimal is less than the other decimal.
|
boolean |
Decimal.isLessThanEqualTo(Decimal other)
States if this decimal is less than or equal to the other decimal.
|
Decimal |
Decimal.minus(Decimal other)
Returns a decimal value that is equal to this value minus the specified value.
|
Decimal |
Decimal.multipliedBy(Decimal other)
Returns a decimal value that is equal to this value multiplied by the specified value.
|
static Decimal |
ArgChecker.notNegative(Decimal argument,
String name)
Checks that the argument is not negative.
|
static Decimal |
ArgChecker.notNegativeOrZero(Decimal argument,
String name)
Checks that the argument is not negative or zero.
|
static Decimal |
ArgChecker.notPositive(Decimal argument,
String name)
Checks that the argument is not positive.
|
static Decimal |
ArgChecker.notPositiveIfPresent(Decimal argument,
String name)
Checks that the argument is not positive if the arguement is not null.
|
static Percentage |
Percentage.of(Decimal percentage)
Obtains an instance from a percentage value.
|
static BasisPoints |
BasisPoints.of(Decimal basisPoints)
Obtains an instance from a basis points value.
|
static FixedScaleDecimal |
FixedScaleDecimal.of(Decimal decimal,
int fixedScale)
Obtains an instance from a decimal and scale.
|
Decimal |
Decimal.plus(Decimal other)
Returns a decimal value that is equal to this value plus the specified value.
|
Decimal |
Decimal.remainder(Decimal other)
Returns the remainder when dividing this value by the specified value.
|
| Modifier and Type | Method and Description |
|---|---|
Percentage |
Percentage.map(UnaryOperator<Decimal> mapper)
Applies an operation to the value.
|
FixedScaleDecimal |
FixedScaleDecimal.map(UnaryOperator<Decimal> fn)
Maps this value using the maths operations of
Decimal. |
BasisPoints |
BasisPoints.map(UnaryOperator<Decimal> mapper)
Applies an operation to the value.
|
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.