Interface LocalStock

  • All Known Implementing Classes:
    LocalStockImpl

    public interface LocalStock
    Represents the stock of a local bookstore.
    Author:
    Maximilian Schiedermeier
    • 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 question
        amount - as the new amount in stock for the book in question
      • getEntireStock

        Map<Long,​Integer> getEntireStock()
        Returns the entire stock of this location, as an immutable map.
        Returns:
        a map, where the key is a book isbn and the value the amount in stock for this isbn.