org.jscience.architecture.lift
Interface Car

All Superinterfaces:
TickableInterface
All Known Implementing Classes:
SimulatedCar

public interface Car
extends TickableInterface

This file is licensed under the GNU Public Licens (GPL).
This is the fundamental interface of all Cars.


Field Summary
static int CLOSING
          The car is closing its doors
static int GOING_DOWN
          The car is waiting with going down
static int GOING_UP
          The car is waiting with going up
static int OPENING
          The car is opening its doors
static int PARKING
          The car is parking with closed doors
static int WAITING
          The car is waiting with open doors
 
Method Summary
 boolean closeDoor()
          Tries to open the Car's door.
 void decreaseNumberOfPassangers()
          This method is called whenever a passenger leaves the Car.
 int getCapacity()
          Returns the capacity of the Car, measured in persons
 int getCrtF()
          Returns the current floor of the Car
 int getDstF()
          Returns the destination floor of the Car if it is moving.
 KinematicModel getKinematicModel()
          Returns the KinematicModel of the Car
 int getNoPs()
          Returns the number of Passengers currently travelling in the Car
 int getPossibleNextFloor()
          Returns the destination floor of the Car.
 int getProgress()
          Returns the progress of the current action (closing door, going to somewhere, etc) of the Car from its KinematicModel.
 int getSrcF()
          Returns the source floor of the Car if it is moving.
 int getState()
          Returns the current state of the Car.
 boolean gotoFloor(int TargetFloor)
          Tries to send the Car to floor TargetFloor.
 void increaseNumberOfPassangers()
          This method is called whenever a passenger enters the Car.
 boolean isEmpty()
          Returns true if and only if the Car is empty.
 boolean isFull()
          Returns true if and only if the Car is full.
 boolean isMoving()
          Returns true if and only if the Car is moving.
 boolean mayStopAt(int AbsFloor)
          Returns true if and only if the Car may stop at AbsFloor before it's planned next stop from the Car's KinematicModel.
 boolean openDoor()
          Tries to open the Car's door.
 void setCapacity(int NewCapacity)
          Sets the capacity of the Car, measured in persons
 java.lang.String toString()
          Object
 
Methods inherited from interface org.jscience.architecture.lift.TickableInterface
getFullName, getID, getName, getVersion, Tick
 

Field Detail

PARKING

static final int PARKING
The car is parking with closed doors

See Also:
Constant Field Values

CLOSING

static final int CLOSING
The car is closing its doors

See Also:
Constant Field Values

OPENING

static final int OPENING
The car is opening its doors

See Also:
Constant Field Values

WAITING

static final int WAITING
The car is waiting with open doors

See Also:
Constant Field Values

GOING_UP

static final int GOING_UP
The car is waiting with going up

See Also:
Constant Field Values

GOING_DOWN

static final int GOING_DOWN
The car is waiting with going down

See Also:
Constant Field Values
Method Detail

decreaseNumberOfPassangers

void decreaseNumberOfPassangers()
This method is called whenever a passenger leaves the Car.


increaseNumberOfPassangers

void increaseNumberOfPassangers()
This method is called whenever a passenger enters the Car.


closeDoor

boolean closeDoor()
Tries to open the Car's door.

Returns:
true if and only if succesful.

getCapacity

int getCapacity()
Returns the capacity of the Car, measured in persons

Returns:
DOCUMENT ME!

setCapacity

void setCapacity(int NewCapacity)
Sets the capacity of the Car, measured in persons

Parameters:
NewCapacity - DOCUMENT ME!

getCrtF

int getCrtF()
Returns the current floor of the Car

Returns:
DOCUMENT ME!

getDstF

int getDstF()
Returns the destination floor of the Car if it is moving.

Returns:
DOCUMENT ME!

getKinematicModel

KinematicModel getKinematicModel()
Returns the KinematicModel of the Car

Returns:
DOCUMENT ME!

getNoPs

int getNoPs()
Returns the number of Passengers currently travelling in the Car

Returns:
DOCUMENT ME!

getPossibleNextFloor

int getPossibleNextFloor()
Returns the destination floor of the Car. This is the next floor where the car could stop, according to its KinematicModel.

Returns:
DOCUMENT ME!

getProgress

int getProgress()
Returns the progress of the current action (closing door, going to somewhere, etc) of the Car from its KinematicModel.

Returns:
DOCUMENT ME!

getSrcF

int getSrcF()
Returns the source floor of the Car if it is moving.

Returns:
DOCUMENT ME!

getState

int getState()
Returns the current state of the Car.

Returns:
DOCUMENT ME!

gotoFloor

boolean gotoFloor(int TargetFloor)
Tries to send the Car to floor TargetFloor.

Parameters:
TargetFloor - DOCUMENT ME!
Returns:
true if and only if succesful.

isEmpty

boolean isEmpty()
Returns true if and only if the Car is empty.

Returns:
DOCUMENT ME!

isFull

boolean isFull()
Returns true if and only if the Car is full.

Returns:
DOCUMENT ME!

isMoving

boolean isMoving()
Returns true if and only if the Car is moving.

Returns:
DOCUMENT ME!

mayStopAt

boolean mayStopAt(int AbsFloor)
Returns true if and only if the Car may stop at AbsFloor before it's planned next stop from the Car's KinematicModel.

Parameters:
AbsFloor - DOCUMENT ME!
Returns:
DOCUMENT ME!

openDoor

boolean openDoor()
Tries to open the Car's door.

Returns:
true if and only if succesful.

toString

java.lang.String toString()
Object

Overrides:
toString in class java.lang.Object
Returns:
DOCUMENT ME!