cz.muni.fi.pb162.task2
Class Mail

java.lang.Object
  extended by cz.muni.fi.pb162.task2.AbstractMessaging
      extended by cz.muni.fi.pb162.task2.Mail
All Implemented Interfaces:
Messaging

public class Mail
extends AbstractMessaging

Class delivers messages through the mail (express or standard)

Version:
06 11 2009
Author:
Tomas Sedmik, xsedmik@fi.muni.cz

Field Summary
static int EXPRESS
           
static int STANDART
           
 
Constructor Summary
Mail(int msgType)
          Constructor.
Mail(int msgType, Message msg)
          Constructor.
 
Method Summary
 double deliveryTime()
          Calculates approximate delivery time.
 
Methods inherited from class cz.muni.fi.pb162.task2.AbstractMessaging
getMessage, send, setMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXPRESS

public static final int EXPRESS
See Also:
Constant Field Values

STANDART

public static final int STANDART
See Also:
Constant Field Values
Constructor Detail

Mail

public Mail(int msgType)
Constructor.

Parameters:
msgType - type of message: standart or express

Mail

public Mail(int msgType,
            Message msg)
Constructor.

Parameters:
msgType - type of message: standart or express
msg - message to delivery
Method Detail

deliveryTime

public double deliveryTime()
Calculates approximate delivery time.

Specified by:
deliveryTime in interface Messaging
Specified by:
deliveryTime in class AbstractMessaging
Returns:
approximate delivery time in hours