tripkit-android / com.skedgo.tripkit.routing / TripGroup / addAsDisplayTrip

addAsDisplayTrip

open fun addAsDisplayTrip(@NonNull trip:Trip):Unit

A sample use case: Add a trip computed by waypoint API into trip list.

Parameters

trip - Trip: This trip must not belong to group's trips. Otherwise, `[IllegalStateException`](https://docs.oracle.com/javase/7/docs/api/java/lang/IllegalStateException.html) will be thrown.

Exceptions

IllegalStateException - if the trip already belongs to the group. To change display trip, should invoke `[TripGroup#changeDisplayTrip(Trip)`](change-display-trip.md) instead.