# Uses of Class
com.university.bookstore.model.Book

Packages that use Book
Package
Description
com.university.bookstore.api
com.university.bookstore.impl
com.university.bookstore.model
com.university.bookstore.utils

- ## Uses of Book in com.university.bookstore.api

  Methods in com.university.bookstore.api that return Book
  Modifier and Type
  Method
  Description
  `Book`
  BookstoreAPI.`findByIsbn(String isbn)`
  Finds a book by its ISBN.
  `Book`
  BookstoreAPI.`getMostExpensive()`
  Finds the most expensive book in the inventory.
  `Book`
  BookstoreAPI.`getMostRecent()`
  Finds the most recently published book.
  `Book[]`
  BookstoreAPI.`snapshotArray()`
  Creates a defensive copy of the inventory as an array.
  Methods in com.university.bookstore.api that return types with arguments of type Book
  Modifier and Type
  Method
  Description
  `List<Book>`
  BookstoreAPI.`findByAuthor(String authorQuery)`
  Searches for books by author (case-insensitive, partial match).
  `List<Book>`
  BookstoreAPI.`findByPriceRange(double minPrice, double maxPrice)`
  Finds all books within a price range (inclusive).
  `List<Book>`
  BookstoreAPI.`findByTitle(String titleQuery)`
  Searches for books by title (case-insensitive, partial match).
  `List<Book>`
  BookstoreAPI.`findByYear(int year)`
  Finds all books published in a specific year.
  `List<Book>`
  BookstoreAPI.`getAllBooks()`
  Gets all books in the inventory.
  Methods in com.university.bookstore.api with parameters of type Book
  Modifier and Type
  Method
  Description
  `boolean`
  BookstoreAPI.`add(Book book)`
  Adds a book to the inventory.

- ## Uses of Book in com.university.bookstore.impl

  Methods in com.university.bookstore.impl that return Book
  Modifier and Type
  Method
  Description
  `Book`
  BookstoreArrayList.`findByIsbn(String isbn)`
  `Book`
  BookstoreArrayList.`getMostExpensive()`
  `Book`
  BookstoreArrayList.`getMostRecent()`
  `Book[]`
  BookstoreArrayList.`snapshotArray()`
  Methods in com.university.bookstore.impl that return types with arguments of type Book
  Modifier and Type
  Method
  Description
  `List<Book>`
  BookstoreArrayList.`findByAuthor(String authorQuery)`
  `List<Book>`
  BookstoreArrayList.`findByPriceRange(double minPrice, double maxPrice)`
  `List<Book>`
  BookstoreArrayList.`findByTitle(String titleQuery)`
  `List<Book>`
  BookstoreArrayList.`findByYear(int year)`
  `List<Book>`
  BookstoreArrayList.`getAllBooks()`
  Methods in com.university.bookstore.impl with parameters of type Book
  Modifier and Type
  Method
  Description
  `boolean`
  BookstoreArrayList.`add(Book book)`
  Constructor parameters in com.university.bookstore.impl with type arguments of type Book
  Modifier
  Constructor
  Description
  ``
  `BookstoreArrayList(Collection<Book> initialBooks)`
  Creates a bookstore with initial books.

- ## Uses of Book in com.university.bookstore.model

  Classes in com.university.bookstore.model that implement interfaces with type arguments of type Book
  Modifier and Type
  Class
  Description
  `final class`
  `Book`
  Represents an immutable book in the bookstore inventory.
  Methods in com.university.bookstore.model with parameters of type Book
  Modifier and Type
  Method
  Description
  `int`
  Book.`compareTo(Book other)`
  Compares this book with another book based on title (alphabetical order).

- ## Uses of Book in com.university.bookstore.utils

  Methods in com.university.bookstore.utils that return Book
  Modifier and Type
  Method
  Description
  `static Book[]`
  BookArrayUtils.`filterByDecade(Book[] books, int decade)`
  Filters books published in a specific decade.
  `static Book[]`
  BookArrayUtils.`filterByYearRange(Book[] books, int startYear, int endYear)`
  Finds books within a year range (inclusive).
  `static Book[]`
  BookArrayUtils.`filterPriceAtMost(Book[] books, double maxPrice)`
  Filters books with price at most the specified maximum.
  `static Book`
  BookArrayUtils.`findLongestTitle(Book[] books)`
  Finds the book with the longest title.
  `static Book`
  BookArrayUtils.`findOldest(Book[] books)`
  Finds the oldest book (earliest publication year).
  `static Book[]`
  BookArrayUtils.`merge(Book[] arr1, Book[] arr2)`
  Merges two book arrays into one, preserving all elements.
  `static Book[]`
  BookArrayUtils.`removeDuplicates(Book[] books)`
  Removes duplicate books based on ISBN.
  Methods in com.university.bookstore.utils with parameters of type Book
  Modifier and Type
  Method
  Description
  `static double`
  BookArrayUtils.`averagePrice(Book[] books)`
  Calculates the average price of books in the array.
  `static int`
  BookArrayUtils.`countBeforeYear(Book[] books, int yearCutoff)`
  Counts books published before a given year.
  `static int`
  BookArrayUtils.`countByAuthor(Book[] books, String author)`
  Counts books by a specific author (case-insensitive, exact match).
  `static Map<Integer,Integer>`
  BookArrayUtils.`countByDecade(Book[] books)`
  Groups books by decade and returns a summary.
  `static Book[]`
  BookArrayUtils.`filterByDecade(Book[] books, int decade)`
  Filters books published in a specific decade.
  `static Book[]`
  BookArrayUtils.`filterByYearRange(Book[] books, int startYear, int endYear)`
  Finds books within a year range (inclusive).
  `static Book[]`
  BookArrayUtils.`filterPriceAtMost(Book[] books, double maxPrice)`
  Filters books with price at most the specified maximum.
  `static Book`
  BookArrayUtils.`findLongestTitle(Book[] books)`
  Finds the book with the longest title.
  `static Book`
  BookArrayUtils.`findOldest(Book[] books)`
  Finds the oldest book (earliest publication year).
  `static Book[]`
  BookArrayUtils.`merge(Book[] arr1, Book[] arr2)`
  Merges two book arrays into one, preserving all elements.
  `static Book[]`
  BookArrayUtils.`removeDuplicates(Book[] books)`
  Removes duplicate books based on ISBN.
  `static void`
  BookArrayUtils.`sortByPrice(Book[] books)`
  Sorts books by price in ascending order (in-place).
  `static void`
  BookArrayUtils.`sortByYear(Book[] books)`
  Sorts books by year in ascending order (in-place).