Interface GlobalStock
-
- All Known Implementing Classes:
GlobalStockImpl
public interface GlobalStock
Represents the stock levels of all local store branches.- Author:
- Maximilian Schiedermeier
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Map<Long,Integer>
getEntireStoreStock(String city)
Returns the entire stock of a local store.int
getStock(String city, Long isbn)
Returns the amount in stock of a given book in a given city.Collection<String>
getStoreLocations()
Returns a list of all cities that have a local stock.void
setStock(String city, Long isbn, Integer amount)
Updates the stock for a given city.
-
-
-
Method Detail
-
getStock
int getStock(String city, Long isbn)
Returns the amount in stock of a given book in a given city.- Parameters:
city
- for the city of interestisbn
- for book id of interest- Returns:
- the amount in stock
-
setStock
void setStock(String city, Long isbn, Integer amount)
Updates the stock for a given city.- Parameters:
city
- for the city of interestisbn
- for book id of interestamount
- for the new amount in stock
-
getStoreLocations
Collection<String> getStoreLocations()
Returns a list of all cities that have a local stock.- Returns:
- a list of all cities (strings)
-
-