Class InventoryItems<T extends InventoryItem<?>>
- java.lang.Object
 - 
- org.salespointframework.inventory.InventoryItems<T>
 
 
- 
- All Implemented Interfaces:
 Iterable<T>,Supplier<Stream<T>>,org.springframework.data.util.Streamable<T>
public class InventoryItems<T extends InventoryItem<?>> extends Object implements org.springframework.data.util.Streamable<T>
An abstraction over a collection ofInventoryItems. Offers convenience methods to handle cases in which a lookup ofInventoryItems for aProductreturn multiple items or aUniqueInventoryItem.- Since:
 - 7.2
 - Author:
 - Oliver Drotbohm
 
 
- 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description QuantitygetTotalQuantity()Returns the total quantity of all theInventoryItems contained.Iterator<T>iterator()static <T extends InventoryItem<?>>
InventoryItems<T>of(@NonNull org.springframework.data.util.Streamable<T> items)- 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
- 
Methods inherited from interface java.lang.Iterable
forEach, spliterator 
 - 
 
 - 
 
- 
- 
Method Detail
- 
getTotalQuantity
public Quantity getTotalQuantity()
Returns the total quantity of all theInventoryItems contained.- Returns:
 - will never be null.
 
 
- 
iterator
public Iterator<T> iterator()
- Specified by:
 iteratorin interfaceIterable<T extends InventoryItem<?>>
 
- 
of
public static <T extends InventoryItem<?>> InventoryItems<T> of(@NonNull @NonNull org.springframework.data.util.Streamable<T> items)
 
 - 
 
 -