de.upb.swtpra05.group03.shuttle
Class OrderHandlingInfo

java.lang.Object
  extended byde.upb.swtpra05.group03.shuttle.OrderHandlingInfo
All Implemented Interfaces:
OrderHandlingInfoInterface

class OrderHandlingInfo
extends java.lang.Object
implements OrderHandlingInfoInterface

Holds the order handling info: duration to finish the order and number of connections between loading and unloading the order.


Field Summary
private  int connections
          number of connections of the order
private  int duration
          duration of the order
 
Constructor Summary
OrderHandlingInfo(int dur, int conns)
          Constructor: Simply sets the attributes.
 
Method Summary
 void add(int dur, int conns)
          Add the given values to the attributes.
 int getConnections()
          Returns the number of connections between loading and unloading the order.
 int getDuration()
          Returns the order duration to finish the order.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

duration

private int duration
duration of the order


connections

private int connections
number of connections of the order

Constructor Detail

OrderHandlingInfo

public OrderHandlingInfo(int dur,
                         int conns)
Constructor: Simply sets the attributes.

Parameters:
dur - the duration of the order
conns - the number of connections of the order
Method Detail

add

public void add(int dur,
                int conns)
Add the given values to the attributes.

Parameters:
dur - the duration of the oder
conns - the number of connections of the order

getDuration

public int getDuration()
Description copied from interface: OrderHandlingInfoInterface
Returns the order duration to finish the order.

Specified by:
getDuration in interface OrderHandlingInfoInterface
Returns:
the order duration to finish the order

getConnections

public int getConnections()
Description copied from interface: OrderHandlingInfoInterface
Returns the number of connections between loading and unloading the order.

Specified by:
getConnections in interface OrderHandlingInfoInterface
Returns:
the number of connections between loading and unloading the order