Package | Description |
---|---|
org.salespointframework.quantity |
Domain types to work with quantities.
|
Modifier and Type | Class and Description |
---|---|
class |
BasicRoundingStrategy
This implementation of a
RoundingStrategy offers to ways to describe a rounding operation: using the decimal
places after (or before) the decimal delimiter and using a rounding step. |
Modifier and Type | Field and Description |
---|---|
static RoundingStrategy |
RoundingStrategy.MONETARY_ROUNDING
Convenience instance, which can be used for monetary rounding.
|
static RoundingStrategy |
RoundingStrategy.ROUND_ONE
Convenience instance, which can be used for rounding of integral types.
|
Modifier and Type | Method and Description |
---|---|
RoundingStrategy |
Quantity.getRoundingStrategy()
Returns the
RoundingStrategy of this Quantity . |
Constructor and Description |
---|
Quantity(BigDecimal amount,
Metric metric,
RoundingStrategy roundingStrategy)
Parameterized class constructor.
|
Quantity(double amount,
Metric metric,
RoundingStrategy roundingStrategy)
Translates a
double to a Quantity . |
Quantity(float amount,
Metric metric,
RoundingStrategy roundingStrategy)
Translates a
float to a Quantity . |
Quantity(int amount,
Metric metric,
RoundingStrategy roundingStrategy)
Translates an
int to a Quantity . |
Quantity(long amount,
Metric metric,
RoundingStrategy roundingStrategy)
Translates a
long to a Quantity . |
Copyright © 2014 Pivotal Software, Inc.. All rights reserved.