final DestType type = containsObject(dp) ? DestType.PICKUP
: DestType.DELIVERY;
final Point pos = getParcelPos(destinationRoadUser);
if (type == DestType.DELIVERY) {
checkArgument(
pm.containerContains((DefaultVehicle) object,
(DefaultParcel) destinationRoadUser),
"A vehicle can only move to the delivery location of a parcel if it is carrying it.");
}
newDestinationObject = new DestinationObject(type, pos, dp);
} else {