|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--edu.lmu.liftor.Place.PlaceImpl
A simple implementation of a Place that tracks and dispatches entrys and exits.
| Nested Class Summary |
| Nested classes inherited from class edu.lmu.liftor.Place |
Place.PlaceFullException, Place.PlaceImpl |
| Field Summary |
| Fields inherited from interface edu.lmu.liftor.Place |
LIMBO |
| Constructor Summary | |
Place.PlaceImpl(java.lang.String name)
|
|
Place.PlaceImpl(java.lang.String name,
int capacity)
|
|
| 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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Place.PlaceImpl(java.lang.String name,
int capacity)
public Place.PlaceImpl(java.lang.String name)
| Method Detail |
public java.lang.String getPlaceName()
getPlaceName in interface Placepublic int getPlaceCapacity()
Place
getPlaceCapacity in interface Placepublic boolean isFull()
Place
isFull in interface Placepublic int getVisitorCount()
Place
getVisitorCount in interface Place
public void enter(Visitor visitor)
throws Place.PlaceFullException
Place
enter in interface PlacePlace.PlaceFullExceptionpublic void exit(Visitor visitor)
Place
exit in interface Place
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||