Uses of Class
org.salespointframework.quantity.Quantity
Package
Description
The inventory subsystem.
The order subsystem.
Domain types to work with quantities.
-
Uses of Quantity in org.salespointframework.catalog
Modifier and TypeMethodDescriptionProduct.createQuantity
(double amount) Product.createQuantity
(long amount) -
Uses of Quantity in org.salespointframework.inventory
Modifier and TypeMethodDescriptionInventoryEvents.StockShort.getCurrentQuantity()
InventoryItem.getQuantity()
InventoryEvents.StockShort.getThreshold()
InventoryItems.getTotalQuantity()
Returns the total quantity of all theInventoryItem
s contained.Modifier and TypeMethodDescriptionInventoryItem.decreaseQuantity
(Quantity quantity) Decreases the quantity of the currentInventoryItem
by the givenQuantity
.boolean
InventoryItem.hasSufficientQuantity
(Quantity quantity) Returns whether theInventoryItem
is available in exactly or more of the given quantity.InventoryItem.increaseQuantity
(Quantity quantity) Increases the quantity of the currentInventoryItem
by the givenQuantity
.ModifierConstructorDescriptionprotected
InventoryItem
(Product product, Quantity quantity) MultiInventoryItem
(Product product, Quantity quantity) UniqueInventoryItem
(Product product, Quantity quantity) -
Uses of Quantity in org.salespointframework.order
Modifier and TypeMethodDescriptionCart.getQuantity
(Product product) Cart.getQuantity
(Product.ProductIdentifier identifier) Returns the quantity for the givenProduct.ProductIdentifier
currently contained in theCart
.CartItem.getQuantity()
OrderLine.getQuantity()
-
Uses of Quantity in org.salespointframework.quantity
Modifier and TypeMethodDescriptionAdds the givenQuantity
to the current one.Quantity.negate()
Returns the negatedQuantity
.static Quantity
Quantity.of
(double amount) Creates a newQuantity
of the given amount.static Quantity
static Quantity
Quantity.of
(long amount) Creates a newQuantity
of the given amount.static Quantity
Subtracts the given Quantity from the current one.Quantity.times
(int multiplier) Creates a newQuantity
of the current one multiplied with the given int.Quantity.times
(long multiplier) Creates a newQuantity
of the current one multiplied with the given long.Quantity.toUnit()
Returns the currentQuantity
as units, flattening all non unit metrics into a single unit.Quantity.toZero()
Modifier and TypeMethodDescriptionAdds the givenQuantity
to the current one.boolean
Returns whether the currentQuantity
is equal to the given one negelecting potential differences in precision of the underlying amount.boolean
Quantity.isGreaterThan
(Quantity other) Returns whether the givenQuantity
is greater than the current one.boolean
Quantity.isGreaterThanOrEqualTo
(Quantity other) Returns whether the givenQuantity
is greater than or equal to the current one.boolean
Quantity.isLessThan
(Quantity other) Returns whether the givenQuantity
is less than the current one.Subtracts the given Quantity from the current one.