|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
ro.polak.multilevelcarpark.controllers.CarPark
public class CarPark
The controller for the whole parking, contains other controllers
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
static GUIDriver |
gui
Gui driver for communicating with the GUI (Separate threads) |
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
CarPark(int levels,
int placesPerRing)
Default contstructor |
|
| Method Summary | |
|---|---|
Car |
getCar(java.lang.String carID)
Finds and returns requested car |
void |
insertCar(java.lang.String carID)
Puts the car on the parking place |
static void |
main(java.lang.String[] args)
The main method running the park |
void |
run()
The main method of the thread It loops waiting for messages from GUI |
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static GUIDriver gui
| Constructor Detail |
|---|
public CarPark(int levels,
int placesPerRing)
levels - placesPerRing - | Method Detail |
|---|
public Car getCar(java.lang.String carID)
throws CarNotFoundException,
IllegalOperationException
carID -
CarNotFoundException
IllegalOperationException
public void insertCar(java.lang.String carID)
throws NoFreePlacesException,
IllegalOperationException
car -
NoFreePlacesException
IllegalOperationExceptionpublic void run()
run in interface java.lang.Runnablerun in class java.lang.Threadpublic static void main(java.lang.String[] args)
args -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||