|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuniversity.Unit
university.Library
public class Library
Singelton Class for the library of the university.
Method Summary | |
---|---|
void |
addBook(Book book)
Adds a new book to the Library. |
static Unit |
create(java.lang.String name,
Address address)
Creates a Libarary unit for the university. |
java.lang.String |
getBooks()
Get a list of all the books in the library. |
static Unit |
getInstance()
Retruns an instance of Library. |
boolean |
search(java.lang.String title)
Search if the Library contains a book. |
Methods inherited from class university.Unit |
---|
getAddress, getName, setAddress, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public static Unit getInstance()
public static Unit create(java.lang.String name, Address address)
name
- The name of the Library.address
- The address of the Library.
public boolean search(java.lang.String title)
title
- The title of the Book to search for.
public void addBook(Book book)
book
- The book to add to the library.public java.lang.String getBooks()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |