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
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
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_reservedString: - Description why cab is not pickup up.int: - Integer corresponding to one of the static ride refusal reasons. Zero is default.
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