-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed up optimization waypoint object
- Loading branch information
Cameron Mace
committed
Jul 18, 2017
1 parent
a88d374
commit dfd079a
Showing
4 changed files
with
86 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72 changes: 72 additions & 0 deletions
72
.../src/main/java/com/mapbox/services/api/optimizedtrips/v1/models/OptimizationWaypoint.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
package com.mapbox.services.api.optimizedtrips.v1.models; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
import com.mapbox.services.api.directions.v5.models.DirectionsWaypoint; | ||
|
||
public class OptimizationWaypoint extends DirectionsWaypoint { | ||
|
||
@SerializedName("waypoint_index") | ||
private int waypointIndex; | ||
@SerializedName("trips_index") | ||
private int tripsIndex; | ||
|
||
/** | ||
* Empty constructor | ||
* | ||
* @since 2.2.0 | ||
*/ | ||
public OptimizationWaypoint() { | ||
} | ||
|
||
/** | ||
* Construct an OptimizationWaypoint object. | ||
* | ||
* @param waypointIndex index of position of the waypoint within the trip | ||
* @param tripsIndex index to the trip object in the trips array that contains this waypoint | ||
* @since 2.2.0 | ||
*/ | ||
public OptimizationWaypoint(int waypointIndex, int tripsIndex) { | ||
this.waypointIndex = waypointIndex; | ||
this.tripsIndex = tripsIndex; | ||
} | ||
|
||
/** | ||
* Index of the waypoint inside the optimization route. | ||
* | ||
* @return index value | ||
* @since 2.2.0 | ||
*/ | ||
public int getWaypointIndex() { | ||
return waypointIndex; | ||
} | ||
|
||
/** | ||
* Index value | ||
* | ||
* @param waypointIndex value | ||
* @since 2.2.0 | ||
*/ | ||
public void setWaypointIndex(int waypointIndex) { | ||
this.waypointIndex = waypointIndex; | ||
} | ||
|
||
/** | ||
* Index to the trip object in the trips array that contains this waypoint. | ||
* | ||
* @return index value | ||
* @since 2.2.0 | ||
*/ | ||
public int getTripsIndex() { | ||
return tripsIndex; | ||
} | ||
|
||
/** | ||
* Index to the trip object in the trips array that contains this waypoint. | ||
* | ||
* @param tripsIndex index value | ||
* @since 2.2.0 | ||
*/ | ||
public void setTripsIndex(int tripsIndex) { | ||
this.tripsIndex = tripsIndex; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters