movement
Class EveningTrip

java.lang.Object
  extended by movement.EveningTrip

public class EveningTrip
extends java.lang.Object

A class to encapsulate information about a shopping trip 1. Where the trip begins 2. Where it ends 3. The path 4. All nodes in the group


Constructor Summary
EveningTrip(int nrOfeveningActivityNodes, Coord location)
          Create a new instance of a EveningTrip
 
Method Summary
 boolean addNode(EveningActivityMovement eveningActivityNode)
          Add an evening activity node to the group
 boolean allMembersPresent()
          Checks if all members of the group have found their way to the meeting point
 Coord getDestination()
           
 Coord getLocation()
           
 Path getPath()
           
 double getWaitTimeAtEnd()
           
 boolean isFull()
           
 void setDestination(Coord destination)
          Sets the destination square of the trip.
 void setPath(Path path)
          Sets the shopping path for the group
 void setWaitTimeAtEnd(double waitTimeAtEnd)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EveningTrip

public EveningTrip(int nrOfeveningActivityNodes,
                   Coord location)
Create a new instance of a EveningTrip

Parameters:
nrOfeveningActivityNodes - The number of shoppers in the group
location - Where the trip starts
Method Detail

addNode

public boolean addNode(EveningActivityMovement eveningActivityNode)
Add an evening activity node to the group

Parameters:
eveningActivityNode -
Returns:
true if there was room in the group

setPath

public void setPath(Path path)
Sets the shopping path for the group

Parameters:
path -

getPath

public Path getPath()
Returns:
The shopping trip path

getLocation

public Coord getLocation()
Returns:
The location where the shopping trip starts

isFull

public boolean isFull()
Returns:
true if the group is full

allMembersPresent

public boolean allMembersPresent()
Checks if all members of the group have found their way to the meeting point

Returns:
true if all nodes are there

getDestination

public Coord getDestination()
Returns:
The destination square of the shopping trip

setDestination

public void setDestination(Coord destination)
Sets the destination square of the trip. MUST be the same as the last node in the path

Parameters:
destination -

getWaitTimeAtEnd

public double getWaitTimeAtEnd()

setWaitTimeAtEnd

public void setWaitTimeAtEnd(double waitTimeAtEnd)