Package | Description |
---|---|
org.salespointframework.catalog | |
org.salespointframework.quantity |
Domain types to work with quantities.
|
Constructor and Description |
---|
Product(String name,
javax.money.MonetaryAmount price,
Metric metric)
|
Modifier and Type | Method and Description |
---|---|
static Metric |
Metric.from(String abbreviation)
Returns the
Metric for the given abbreviation. |
Metric |
Quantity.getMetric()
The metric of the Quantity.
|
static Metric |
Metric.valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Metric[] |
Metric.values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
Modifier and Type | Method and Description |
---|---|
boolean |
Metric.isCompatibleWith(Metric metric)
Returns whether the given
Metric is |
boolean |
Quantity.isCompatibleWith(Metric metric)
|
static Quantity |
Quantity.of(BigDecimal amount,
Metric metric)
|
static Quantity |
Quantity.of(double amount,
Metric metric)
|
static Quantity |
Quantity.of(long amount,
Metric metric)
|
Constructor and Description |
---|
MetricMismatchException(Metric m1,
Metric m2) |
MetricMismatchException(String text,
Metric m1,
Metric m2) |
Copyright © 2018 Pivotal Software, Inc.. All rights reserved.