|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jwalk.test.LibraryBook
public class LibraryBook
A simple LibraryBook that can be issued and discharged on loan to a borrower. One borrower at a time is allowed; the object exists in two states: Default and OnLoan.
Constructor Summary | |
---|---|
LibraryBook()
Constructs a LibraryBook in its default state. |
Method Summary | |
---|---|
void |
discharge()
Discharges the loan of this LibraryBook. |
java.lang.String |
getBorrower()
Returns the name of the current borrower, or null. |
boolean |
isOnLoan()
Reports if this LibraryBook is on loan. |
void |
issue(java.lang.String person)
Issues this LibraryBook to the named person. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LibraryBook()
Method Detail |
---|
public void issue(java.lang.String person) throws java.lang.Exception
java.lang.Exception
public void discharge()
public java.lang.String getBorrower()
public boolean isOnLoan()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |