TripModelOptions
Stay organized with collections
Save and categorize content based on your preferences.
Configuration that affects active searches set in TripModelManager
.
Public Constructor Summary
Inherited Method Summary
From class java.lang.Object
Object
|
clone()
|
boolean |
|
void |
finalize()
|
final Class<?>
|
getClass()
|
int |
hashCode()
|
final void |
notify()
|
final void |
notifyAll()
|
String
|
toString()
|
final void |
wait(long arg0, int arg1)
|
final void |
wait(long arg0)
|
final void |
wait()
|
Constants
public static final long
DEFAULT_REFRESH_INTERVAL_MILLIS
Public Constructors
public TripModelOptions ()
Public Methods
public abstract long getRefreshIntervalMillis ()
The refresh interval in milliseconds. The trip will automatically refresh and notify
registered callbacks of updates on this interval.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-27 UTC.
[null,null,["Last updated 2025-08-27 UTC."],[[["\u003cp\u003e\u003ccode\u003eTripModelOptions\u003c/code\u003e configures active searches within the \u003ccode\u003eTripModelManager\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIt allows setting a refresh interval for trip updates, defaulting to 1000 milliseconds.\u003c/p\u003e\n"],["\u003cp\u003eA \u003ccode\u003eBuilder\u003c/code\u003e class is provided for creating and customizing \u003ccode\u003eTripModelOptions\u003c/code\u003e instances.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003egetRefreshIntervalMillis\u003c/code\u003e retrieves the configured update frequency.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003etoBuilder\u003c/code\u003e enables modification of existing \u003ccode\u003eTripModelOptions\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# TripModelOptions\n\npublic abstract class **TripModelOptions** extends [Object](//developer.android.com/reference/java/lang/Object.html) \nConfiguration that affects active searches set in `TripModelManager`. \n\n### Nested Class Summary\n\n|-------|---|---|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| class | [TripModelOptions.Builder](/maps/documentation/mobility/journey-sharing/on-demand/reference/consumer_2/android/reference/com/google/android/libraries/mapsplatform/transportation/consumer/model/TripModelOptions.Builder) || Builder for [TripModelOptions](/maps/documentation/mobility/journey-sharing/on-demand/reference/consumer_2/android/reference/com/google/android/libraries/mapsplatform/transportation/consumer/model/TripModelOptions). |\n\n### Constant Summary\n\n|------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| long | [DEFAULT_REFRESH_INTERVAL_MILLIS](/maps/documentation/mobility/journey-sharing/on-demand/reference/consumer_2/android/reference/com/google/android/libraries/mapsplatform/transportation/consumer/model/TripModelOptions#DEFAULT_REFRESH_INTERVAL_MILLIS) | |\n\n### Public Constructor Summary\n\n|---|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| | [TripModelOptions](/maps/documentation/mobility/journey-sharing/on-demand/reference/consumer_2/android/reference/com/google/android/libraries/mapsplatform/transportation/consumer/model/TripModelOptions#TripModelOptions())() |\n\n### Public Method Summary\n\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| static [TripModelOptions.Builder](/maps/documentation/mobility/journey-sharing/on-demand/reference/consumer_2/android/reference/com/google/android/libraries/mapsplatform/transportation/consumer/model/TripModelOptions.Builder) | [builder](/maps/documentation/mobility/journey-sharing/on-demand/reference/consumer_2/android/reference/com/google/android/libraries/mapsplatform/transportation/consumer/model/TripModelOptions#builder())() |\n| abstract long | [getRefreshIntervalMillis](/maps/documentation/mobility/journey-sharing/on-demand/reference/consumer_2/android/reference/com/google/android/libraries/mapsplatform/transportation/consumer/model/TripModelOptions#getRefreshIntervalMillis())() The refresh interval in milliseconds. |\n| abstract [TripModelOptions.Builder](/maps/documentation/mobility/journey-sharing/on-demand/reference/consumer_2/android/reference/com/google/android/libraries/mapsplatform/transportation/consumer/model/TripModelOptions.Builder) | [toBuilder](/maps/documentation/mobility/journey-sharing/on-demand/reference/consumer_2/android/reference/com/google/android/libraries/mapsplatform/transportation/consumer/model/TripModelOptions#toBuilder())() |\n\n### Inherited Method Summary\n\nFrom class java.lang.Object \n\n|----------------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| [Object](//developer.android.com/reference/java/lang/Object.html) | clone() |\n| boolean | equals([Object](//developer.android.com/reference/java/lang/Object.html) arg0) |\n| void | finalize() |\n| final [Class](//developer.android.com/reference/java/lang/Class.html)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](//developer.android.com/reference/java/lang/String.html) | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nConstants\n---------\n\n#### public static final long\n**DEFAULT_REFRESH_INTERVAL_MILLIS**\n\nConstant Value: 1000\n\nPublic Constructors\n-------------------\n\n#### public **TripModelOptions** ()\n\nPublic Methods\n--------------\n\n#### public static [TripModelOptions.Builder](/maps/documentation/mobility/journey-sharing/on-demand/reference/consumer_2/android/reference/com/google/android/libraries/mapsplatform/transportation/consumer/model/TripModelOptions.Builder) **builder**\n()\n\n#### public abstract long **getRefreshIntervalMillis** ()\n\nThe refresh interval in milliseconds. The trip will automatically refresh and notify\nregistered callbacks of updates on this interval. \n\n#### public abstract [TripModelOptions.Builder](/maps/documentation/mobility/journey-sharing/on-demand/reference/consumer_2/android/reference/com/google/android/libraries/mapsplatform/transportation/consumer/model/TripModelOptions.Builder) **toBuilder**\n()"]]