public DirectionsApiRequest transitRoutingPreference(TransitRoutingPreference pref) {
    return param("transit_routing_preference", pref);
  }
Specifies preferences for transit requests. Using this parameter, you can bias the options
returned, rather than accepting the default best route chosen by the API.

@param pref The transit routing preferences for this request.
@return Returns this {@code DirectionsApiRequest} for call chaining.
src/main/java/com/google/maps/DirectionsApiRequest.java