|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
A place is somewhere that a Visitor may visit.
| Nested Class Summary | |
static class |
Place.PlaceFullException
This exception is thrown whenever a place is unable to accept entry of a new visitor. |
static class |
Place.PlaceImpl
A simple implementation of a Place that tracks and dispatches entrys and exits. |
| Field Summary | |
static Place |
LIMBO
The place that isn't a place at all. |
| Method Summary | |
void |
enter(Visitor visitor)
Add the visitor to this place. |
void |
exit(Visitor visitor)
The given visitor wishes to exit the place. |
int |
getPlaceCapacity()
Returns the maximum number of Visitors that can be in this place. |
java.lang.String |
getPlaceName()
|
int |
getVisitorCount()
Returns the number of Visitors that are currently in this place. |
boolean |
isFull()
Returns whether this place is full right now. |
| Field Detail |
public static final Place LIMBO
| Method Detail |
public void enter(Visitor visitor)
throws Place.PlaceFullException
Place.PlaceFullExceptionpublic void exit(Visitor visitor)
public int getVisitorCount()
public int getPlaceCapacity()
public boolean isFull()
public java.lang.String getPlaceName()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||