public class UserRequest
extends java.lang.Object
implements android.os.Parcelable
| Modifier and Type | Field and Description |
|---|---|
static android.os.Parcelable.Creator<UserRequest> |
CREATOR
Static variable to create user requests from a parcel
|
| Constructor and Description |
|---|
UserRequest(com.google.android.gms.maps.model.LatLng start,
com.google.android.gms.maps.model.LatLng end,
java.lang.Number fare,
java.lang.String riderId)
Instantiates a new User request.
|
UserRequest(com.google.android.gms.maps.model.LatLng start,
com.google.android.gms.maps.model.LatLng end,
java.lang.Number fare,
java.lang.String riderId,
java.lang.String riderUsername,
java.lang.Double distance,
java.lang.String description,
java.lang.String startLocationName,
java.lang.String endLocationString)
Instantiates a new User request.
|
UserRequest(android.os.Parcel in)
Creator to create UserRequest based on a parcel
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAcceptedDriver(java.lang.String id)
Add accepted driver.
|
void |
clearAcceptedDrivers()
Clear accepted drivers.
|
int |
describeContents() |
boolean |
equals(java.lang.Object obj) |
java.util.ArrayList<java.lang.String> |
getAcceptedDriverIDs()
Gets accepted driver i ds.
|
boolean |
getAcceptedStatus()
Get accepted status boolean.
|
java.lang.String |
getConfirmedDriverID()
Gets confirmed driver id.
|
java.lang.String |
getDateString()
Gets date string.
|
java.lang.String |
getDescription()
Gets description.
|
java.lang.Double |
getDistance()
Gets distance.
|
com.google.android.gms.maps.model.LatLng |
getEndLocation()
Gets end location.
|
java.lang.String |
getEndLocationName()
Get end location name string.
|
java.lang.Number |
getFare()
Gets fare.
|
java.lang.String |
getId()
Gets id.
|
RequestStatus |
getRequestStatus()
Gets request status.
|
java.lang.String |
getRiderID()
Gets rider id.
|
java.lang.String |
getRiderUsername()
Get rider username string.
|
com.google.android.gms.maps.model.LatLng |
getStartLocation()
Gets start location.
|
java.lang.String |
getStartLocationName()
Get start location name string.
|
boolean |
hasConfirmedRider()
Has confirmed rider boolean.
|
boolean |
isCompleted()
Is completed boolean.
|
boolean |
isPaymentRecived()
Is payment recived boolean.
|
boolean |
sentNotification()
Sent notification boolean.
|
void |
setAcceptedStatus(java.lang.Boolean bool)
Set accepted status.
|
void |
setCompletedStatus(boolean completed)
Sets completed status.
|
void |
setConfirmedDriver(java.lang.String id)
Sets confirmed driver.
|
void |
setDistance(java.lang.Double distance)
Set distance.
|
void |
setEndLocation(com.google.android.gms.maps.model.LatLng endLocation)
Sets end location.
|
void |
setEndLocationName(java.lang.String endLocationName)
Set end location name.
|
void |
setFare(java.lang.Number fare)
Sets fare.
|
void |
setId(java.lang.String id)
Sets id.
|
void |
setInProgress()
Sets in progress.
|
void |
setPaymentReceived(boolean paymentReceived)
Sets payment received.
|
void |
setStartLocation(com.google.android.gms.maps.model.LatLng startLocation)
Sets start location.
|
void |
setStartLocationName(java.lang.String startLocationName)
Set start location name.
|
java.lang.String |
toString() |
void |
writeToParcel(android.os.Parcel out,
int flags)
Writes data to the inputted parcel
Byte reading writing taken on Nov 7 2016 from
http://stackoverflow.com/questions/6201311/how-to-read-write-a-boolean-when-implementing-the-parcelable-interface
|
public static final android.os.Parcelable.Creator<UserRequest> CREATOR
public UserRequest(com.google.android.gms.maps.model.LatLng start,
com.google.android.gms.maps.model.LatLng end,
java.lang.Number fare,
java.lang.String riderId,
java.lang.String riderUsername,
java.lang.Double distance,
java.lang.String description,
java.lang.String startLocationName,
java.lang.String endLocationString)
start - the startend - the endfare - the fareriderId - the rider idriderUsername - the rider usernamedistance - the distancedescription - the descriptionstartLocationName - the start location nameendLocationString - the end location stringpublic UserRequest(com.google.android.gms.maps.model.LatLng start,
com.google.android.gms.maps.model.LatLng end,
java.lang.Number fare,
java.lang.String riderId)
start - the startend - the endfare - the fareriderId - the rider idpublic UserRequest(android.os.Parcel in)
in - : Parcelpublic void clearAcceptedDrivers()
public java.lang.String getConfirmedDriverID()
public java.util.ArrayList<java.lang.String> getAcceptedDriverIDs()
public java.lang.String getRiderID()
public com.google.android.gms.maps.model.LatLng getEndLocation()
public java.lang.Number getFare()
public com.google.android.gms.maps.model.LatLng getStartLocation()
public boolean getAcceptedStatus()
public boolean isCompleted()
public boolean sentNotification()
public java.lang.String getStartLocationName()
public java.lang.String getEndLocationName()
public java.lang.String getDateString()
public java.lang.Double getDistance()
public java.lang.String getId()
public java.lang.String getDescription()
public java.lang.String getRiderUsername()
public void setId(java.lang.String id)
id - the idpublic void setConfirmedDriver(java.lang.String id)
id - the idpublic void setStartLocation(com.google.android.gms.maps.model.LatLng startLocation)
startLocation - the start locationpublic void setInProgress()
public void setEndLocation(com.google.android.gms.maps.model.LatLng endLocation)
endLocation - the end locationpublic void setPaymentReceived(boolean paymentReceived)
paymentReceived - the payment receivedpublic void setFare(java.lang.Number fare)
fare - the farepublic void setAcceptedStatus(java.lang.Boolean bool)
bool - the boolpublic void setCompletedStatus(boolean completed)
completed - the completedpublic void setStartLocationName(java.lang.String startLocationName)
startLocationName - the start location namepublic void setEndLocationName(java.lang.String endLocationName)
endLocationName - the end location namepublic void setDistance(java.lang.Double distance)
distance - the distancepublic boolean isPaymentRecived()
public boolean hasConfirmedRider()
public void addAcceptedDriver(java.lang.String id)
id - the idpublic RequestStatus getRequestStatus()
public void writeToParcel(android.os.Parcel out,
int flags)
writeToParcel in interface android.os.Parcelableout - : Parcelflags - : intpublic int describeContents()
describeContents in interface android.os.Parcelablepublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object