Package org.salespointframework.order
Interface Totalable<T extends org.salespointframework.order.Priced>
- All Superinterfaces:
Iterable<T>,Streamable<T>,Supplier<Stream<T>>
An extension of
Streamable of Priced objects that expose a getTotal() method so that the
combined price can be calculated easily.- Since:
- 7.1
- Author:
- Oliver Gierke
-
Method Summary
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
of
- Parameters:
priced- must not be null.- Returns:
-
getTotal
javax.money.MonetaryAmount getTotal()Returns the total of all thePricedelements contained in thisTotalable.- Returns:
-
and
Creates a newTotalablewith the given one added to the current one.- Specified by:
andin interfaceStreamable<T extends org.salespointframework.order.Priced>- Parameters:
priced- must not be null.- Returns:
-