Interface LocalStock
-
- All Known Implementing Classes:
LocalStockImpl
public interface LocalStock
Represents the stock of a local bookstore.- Author:
- Maximilian Schiedermeier
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getAmount(long isbn)
Tells the amount in stock for a given book id (isbn).Map<Long,Integer>
getEntireStock()
Returns the entire stock of this location, as an immutable map.void
setAmount(long isbn, int amount)
Update the amount of books in local stock, for a given book.
-
-
-
Method Detail
-
getAmount
int getAmount(long isbn)
Tells the amount in stock for a given book id (isbn).- Parameters:
isbn
- as identifier of the book in question- Returns:
- the amount in stock for the given book.
-
setAmount
void setAmount(long isbn, int amount)
Update the amount of books in local stock, for a given book.- Parameters:
isbn
- as identifies of the book in questionamount
- as the new amount in stock for the book in question
-
-