Index

A C G H I M R S 
All Classes and Interfaces|All Packages

A

addToCurrentSpellbooks(int) - Method in class Student
Adds a spellbook to the list of currently rented books.
addToHistory(int) - Method in class SpellBook
Adds a student ID to the rental history of the spell book.
addToHistory(int) - Method in class Student
Adds a spell book to the rental history.
Archive - Class in Unnamed Package
Entry point for the spellbook archive system.
Archive() - Constructor for class Archive
 

C

checkEmptySpellbooks() - Method in class CommonErrorChecker
Checks if the spellbook map is empty.
checkEmptyStudents() - Method in class CommonErrorChecker
Checks if the student map is empty.
clearCurrentSpellbooks() - Method in class Student
 
CommandHandler - Class in Unnamed Package
Handles user commands for managing students and spellbooks in the Hogwarts Archive system.
CommandHandler() - Constructor for class CommandHandler
 
CommonErrorChecker - Class in Unnamed Package
Class for validating common errors in system.
CommonErrorChecker(Map<Integer, Student>, Map<Integer, SpellBook>) - Constructor for class CommonErrorChecker
Constructs a CommonErrorChecker with the given student and spellbook maps.

G

getCurrentSpellbooks() - Method in class Student
 
getHistory() - Method in class SpellBook
Returns the rental history of the spell book.
getHistory() - Method in class Student
 
getInventor() - Method in class SpellBook
 
getName() - Method in class Student
 
getNumber() - Method in class Student
 
getPrintableForm() - Method in class SpellBook
 
getPrintableForm(boolean) - Method in class SpellBook
Returns a printable string representation of the spell book.
getRentingStatus() - Method in class SpellBook
 
getSerialNumber() - Method in class SpellBook
 
getStudentRenting() - Method in class SpellBook
Returns the student ID currently renting the spell book.
getTitle() - Method in class SpellBook
 
getType() - Method in class SpellBook
 

H

handleCommand(String) - Method in class CommandHandler
Parses and executes a user command.

I

isMissingSpellbook(int) - Method in class CommonErrorChecker
Checks if a spellbook with the given serial number exists.
isMissingStudent(int) - Method in class CommonErrorChecker
Checks if a student with the given ID exists.

M

main(String[]) - Static method in class Archive
Starts the command-line interface for the Hogwarts Archive system.

R

removeSpellbook(int) - Method in class Student
Removes a spell book from the list of currently rented books.
resetStudentId() - Static method in class Student
Resets the student ID counter to its initial value between testcases.

S

setInventor(String) - Method in class SpellBook
 
setName(String) - Method in class Student
 
setSerialNumber(int) - Method in class SpellBook
 
setStudentRenting(int) - Method in class SpellBook
 
setTitle(String) - Method in class SpellBook
 
setType(String) - Method in class SpellBook
 
SpellBook - Class in Unnamed Package
The SpellBook class represents a magical book in a library system.
SpellBook(int, String, String, String) - Constructor for class SpellBook
Constructs a new SpellBook with the specified details.
spellbookNotRentedByStudent(int, int) - Method in class CommonErrorChecker
Checks if the specified spellbook is currently rented by the given student.
Student - Class in Unnamed Package
Represents a student who can rent spell books.
Student(String) - Constructor for class Student
Constructs a new Student with a unique student ID and the given name.
A C G H I M R S 
All Classes and Interfaces|All Packages