taxisrus.exceptions
Class NoReservationMadeException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--taxisrus.exceptions.NoReservationMadeException
All Implemented Interfaces:
Serializable

public class NoReservationMadeException
extends Exception

See Also:
Serialized Form

Field Summary
static int NO_CAB_CLOSE_ENOUGH
           
static int NO_CAB_IN_ZONE
           
static int NO_REASON
           
 
Constructor Summary
NoReservationMadeException(Customer not_reserved)
          Create a new exception, storing not_reserved in 'needs_a_ride'
NoReservationMadeException(Customer not_reserved, String str_refusal_reason, int int_refusal_reason)
          Create a new exception, storing not_reserved in 'needs_a_ride'
 
Method Summary
 int getIntReason()
          Get reason_as_int
 Customer getNeedsARide()
          Return not_reserved
 void setReason(String refusal_reason)
          Store reason for failed scheduling
 String toString()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NO_REASON

public static final int NO_REASON

NO_CAB_IN_ZONE

public static final int NO_CAB_IN_ZONE

NO_CAB_CLOSE_ENOUGH

public static final int NO_CAB_CLOSE_ENOUGH
Constructor Detail

NoReservationMadeException

public NoReservationMadeException(Customer not_reserved)
Create a new exception, storing not_reserved in 'needs_a_ride'
Parameters:
Customer - not_reserved

NoReservationMadeException

public NoReservationMadeException(Customer not_reserved,
                                  String str_refusal_reason,
                                  int int_refusal_reason)
Create a new exception, storing not_reserved in 'needs_a_ride'
Parameters:
Customer - not_reserved
String: - Description why cab is not pickup up.
int: - Integer corresponding to one of the static ride refusal reasons. Zero is default.
Method Detail

getNeedsARide

public Customer getNeedsARide()
Return not_reserved
Returns:
Customer needs_a_ride

getIntReason

public int getIntReason()
Get reason_as_int
Returns:
int reason_as_int

setReason

public void setReason(String refusal_reason)
Store reason for failed scheduling
Parameters:
String - refusal_reason

toString

public String toString()
Overrides:
toString in class Throwable


API documentation for build 958