tripkit-android / com.skedgo.tripkit.routing / Trip

Trip

open class Trip :ITimeRange

A [`Trip`](./index.md) will mainly hold a list ofTripSegments which denotes how to go from [`Trip#getFrom()`](get-from.md) toTrip#getTo().

Main use-cases: - Trip's segments: [`Trip#getSegments()`](get-segments.md). - Trip's start time:TripExtensionsKt#getStartDateTime(Trip). - Trip's end time: [`TripExtensionsKt#getEndDateTime(Trip)`](../end-date-time.md)}. - Trip's costs:#getCaloriesCost(), [`#getMoneyCost()`](get-money-cost.md),#getCarbonCost().

Constructors

Name Summary
<init> Trip()

Properties

Name Summary
rawSegmentList This will be transformed into a list of `[TripSegment](../-trip-segment/index.md).var rawSegmentList: [ArrayList](https://docs.oracle.com/javase/7/docs/api/java/util/ArrayList.html)!`
UNKNOWN_COST static val UNKNOWN_COST:Float

Functions

Name Summary
durationInSeconds open fun durationInSeconds():Long
getAvailability Indicates availability of the trip, e.g., if it's too late to book a trip for the requested departure time, or if a scheduled service has been cancelled.open fun getAvailability():Availability?
getCaloriesCost open fun getCaloriesCost():Float
getCarbonCost open fun getCarbonCost():Float
getCurrencySymbol open fun getCurrencySymbol():String!
getDisplayCalories open fun getDisplayCalories():String!
getDisplayCarbonCost open fun getDisplayCarbonCost():String?
getDisplayCost open fun getDisplayCost(localizedFreeText:String!):String?
getEndTimeInSecs Use `[TripExtensionsKt#getEndDateTime(Trip)](../end-date-time.md) instead.open fun getEndTimeInSecs(): [Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)
getFrom open fun getFrom():Location!
getGroup open fun getGroup():TripGroup!
getHassleCost open fun getHassleCost():Float
getId open fun getId():Long
getMoneyCost open fun getMoneyCost():Float
getPlannedURL open fun getPlannedURL():String?
getProgressURL open fun getProgressURL():String!
getSaveURL open fun getSaveURL():String!
getSegments open fun getSegments():ArrayList<TripSegment!>!
getStartTimeInSecs Use `[TripExtensionsKt#getStartDateTime(Trip)](../start-date-time.md) instead.open fun getStartTimeInSecs(): [Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)
getTemporaryURL open fun getTemporaryURL():String?
getTimeCost open fun getTimeCost():Float
getTo open fun getTo():Location!
getUpdateURL open fun getUpdateURL():String?
getWeightedScore open fun getWeightedScore():Float
hasAnyExpensiveTransport Check if this trip has shuffle, taxi or shared vehicle.open fun hasAnyExpensiveTransport():Boolean
hasAnyPublicTransport open fun hasAnyPublicTransport():Boolean
hasQuickBooking open fun hasQuickBooking():Boolean
hasTransportMode open fun hasTransportMode(vararg modes:VehicleMode!):Boolean
isDepartureTimeFixed Adrian: "duration (arrive)" should be used for transport where the departure time isn't fixed, such as driving trips not involving public transport, or public transport trips that use only frequency-based trips.open fun isDepartureTimeFixed():Boolean
isFavourite open fun isFavourite():Boolean
open fun isFavourite(isFavourite:Boolean):Unit
isMixedModal open fun isMixedModal(ignoreWalking:Boolean):Boolean
queryIsLeaveAfter open fun queryIsLeaveAfter():Boolean
setCaloriesCost open fun setCaloriesCost(caloriesCost:Float):Unit
setCarbonCost open fun setCarbonCost(carbonCost:Float):Unit
setEndTimeInSecs NOTE: You should only use this setter for testing purpose.open fun setEndTimeInSecs(endTimeInSecs:Long):Unit
setGroup open fun setGroup(group:TripGroup!):Unit
setHassleCost open fun setHassleCost(hassleCost:Float):Unit
setId open fun setId(id:Long):Unit
setMoneyCost open fun setMoneyCost(moneyCost:Float):Unit
setSaveURL open fun setSaveURL(saveURL:String!):Unit
setSegments open fun setSegments(segments:ArrayList<TripSegment!>!):Unit
setStartTimeInSecs NOTE: You should only use this setter for testing purpose.open fun setStartTimeInSecs(startTimeInSecs:Long):Unit
setTemporaryURL open fun setTemporaryURL(temporaryURL:String!):Unit
setUpdateURL open fun setUpdateURL(updateURL:String!):Unit
setWeightedScore open fun setWeightedScore(weightedScore:Float):Unit
uuid open fun uuid(uuid:String!):Unit
open fun uuid():String!

Extension Properties

Name Summary
endDateTime Get an end date-time with time-zone.valTrip.endDateTime: DateTime
startDateTime Gets a start date-time with time-zone.valTrip.startDateTime: DateTime

Extension Functions

Name Summary
constructPlainText funTrip.constructPlainText(context: Context):String
getModeIds funTrip.getModeIds():List<String>
getSummarySegments Gets a list of TripSegments visible on the summary area of a Trip.funTrip.getSummarySegments():List<TripSegment>
getTripSegment funTrip.getTripSegment(segmentId:Long):TripSegment?
hasWalkOnly funTrip.hasWalkOnly():Boolean