@@ -1046,6 +1046,22 @@ public Builder waypointTargets(@NonNull List<Point> waypointTargets) {
10461046
10471047 abstract Builder waypointTargets (@ Nullable String waypointTargets );
10481048
1049+ /**
1050+ * A point to specify drop-off locations that are distinct from the locations specified in
1051+ * coordinates.
1052+ * The number of waypoint targets must be the same as the number of coordinates,
1053+ * but you can skip a coordinate with a null value.
1054+ * Must be used with steps=true.
1055+ *
1056+ * @param waypointTarget a point for drop-off locations
1057+ * @return this builder for chaining options together
1058+ * @since 4.3.0
1059+ */
1060+ public Builder addWaypointTarget (@ Nullable Point waypointTarget ) {
1061+ this .waypointTargets .add (waypointTarget );
1062+ return this ;
1063+ }
1064+
10491065 /**
10501066 * A list of booleans affecting snapping of waypoint locations to road segments.
10511067 * If true, road segments closed due to live-traffic closures will be considered for snapping.
@@ -1066,18 +1082,20 @@ public Builder snappingClosures(@NonNull List<Boolean> snappingClosures) {
10661082 abstract Builder snappingClosures (@ Nullable String snappingClosures );
10671083
10681084 /**
1069- * A point to specify drop-off locations that are distinct from the locations specified in
1085+ * A boolean affecting snapping of waypoint location to the road segment.
1086+ * If true, road segment closed due to live-traffic closure will be considered for snapping.
1087+ * If false, it will not be considered for snapping.
1088+ * If provided, the number of snappingClosures must be the same as the number of
10701089 * coordinates.
1071- * The number of waypoint targets must be the same as the number of coordinates,
1072- * but you can skip a coordinate with a null value.
1073- * Must be used with steps=true.
1090+ * You can skip a coordinate with null value.
1091+ * Must be used with {@link DirectionsCriteria#PROFILE_DRIVING_TRAFFIC}
10741092 *
1075- * @param waypointTarget a point for drop-off locations
1093+ * @param snappingClosure a boolean affecting snapping of waypoint location to the road segment.
10761094 * @return this builder for chaining options together
1077- * @since 4.3 .0
1095+ * @since 5.9 .0
10781096 */
1079- public Builder addWaypointTarget (@ Nullable Point waypointTarget ) {
1080- this .waypointTargets .add (waypointTarget );
1097+ public Builder addSnappingClosure (@ Nullable Boolean snappingClosure ) {
1098+ this .snappingClosures .add (snappingClosure );
10811099 return this ;
10821100 }
10831101
0 commit comments