in uber-rides/src/main/java/com/uber/sdk/rides/client/model/RideRequestParameters.java [326:356]
private void validate() {
if (startPlaceId != null) {
if (startLatitude != null || startLongitude != null) {
throw new IllegalArgumentException("Exactly one of pickup place or pickup " +
"coordinates must be specified");
}
} else {
if (startLatitude == null && startLongitude == null) {
throw new IllegalArgumentException("Exactly one of pickup place or pickup " +
"coordinates must be specified");
} else if (startLatitude == null || startLongitude == null) {
throw new IllegalArgumentException("If using coordinates, both pickup " +
"latitude and pickup longitude must be present");
}
}
if (endPlaceId != null) {
if (endLatitude != null || endLongitude != null) {
throw new IllegalArgumentException("Exactly one of dropoff place or dropoff " +
"coordinates must be specified.");
}
} else {
if (endLatitude == null && endLongitude == null) {
throw new IllegalArgumentException("Exactly one of dropoff place or dropoff " +
"coordinates must be specified.");
} else if (endLatitude == null || endLongitude == null) {
throw new IllegalArgumentException("If using coordinates, both dropoff " +
"latitude and dropoff longitude must be present");
}
}
}