Skip to content

Commit 91553e7

Browse files
author
Cameron
committed
fixed rest of libjava lib files for checkstyle
1 parent 55350a7 commit 91553e7

66 files changed

Lines changed: 5305 additions & 5348 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

libjava/lib/src/main/java/com/mapbox/services/Constants.java

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -4,43 +4,43 @@
44

55
public class Constants {
66

7-
/**
8-
* Package version
9-
*/
10-
public final static String MAPBOX_JAVA_VERSION = "2.0.0-SNAPSHOT";
11-
12-
/**
13-
* User agent for HTTP requests
14-
*/
15-
public final static String HEADER_USER_AGENT =
16-
String.format(Locale.US, "MapboxJava/%s", MAPBOX_JAVA_VERSION);
17-
18-
/**
19-
* Base URL for all API calls, not hardcoded to enable testing
20-
*/
21-
public final static String BASE_API_URL = "https://api.mapbox.com";
22-
23-
/**
24-
* Constants for polyline encoding/decoding
25-
*/
26-
public final static int GOOGLE_PRECISION = 5;
27-
public final static int OSRM_PRECISION_V4 = 6;
28-
public final static int OSRM_PRECISION_V5 = 5;
29-
30-
/**
31-
* Default user for services
32-
*/
33-
public final static String MAPBOX_USER = "mapbox";
34-
35-
/**
36-
* Mapbox default styles
37-
* https://www.mapbox.com/developers/api/styles/
38-
*/
39-
public final static String MAPBOX_STYLE_STREETS = "streets-v9";
40-
public final static String MAPBOX_STYLE_LIGHT = "light-v9";
41-
public final static String MAPBOX_STYLE_DARK = "dark-v9";
42-
public final static String MAPBOX_STYLE_OUTDOORS = "outdoors-v9";
43-
public final static String MAPBOX_STYLE_SATELLITE = "satellite-v9";
44-
public final static String MAPBOX_STYLE_SATELLITE_HYBRID = "satellite-streets-v9";
7+
/**
8+
* Package version
9+
*/
10+
public static final String MAPBOX_JAVA_VERSION = "2.0.0-SNAPSHOT";
11+
12+
/**
13+
* User agent for HTTP requests
14+
*/
15+
public static final String HEADER_USER_AGENT =
16+
String.format(Locale.US, "MapboxJava/%s", MAPBOX_JAVA_VERSION);
17+
18+
/**
19+
* Base URL for all API calls, not hardcoded to enable testing
20+
*/
21+
public static final String BASE_API_URL = "https://api.mapbox.com";
22+
23+
/**
24+
* Constants for polyline encoding/decoding
25+
*/
26+
public static final int GOOGLE_PRECISION = 5;
27+
public static final int OSRM_PRECISION_V4 = 6;
28+
public static final int OSRM_PRECISION_V5 = 5;
29+
30+
/**
31+
* Default user for services
32+
*/
33+
public static final String MAPBOX_USER = "mapbox";
34+
35+
/**
36+
* Mapbox default styles
37+
* https://www.mapbox.com/developers/api/styles/
38+
*/
39+
public static final String MAPBOX_STYLE_STREETS = "streets-v9";
40+
public static final String MAPBOX_STYLE_LIGHT = "light-v9";
41+
public static final String MAPBOX_STYLE_DARK = "dark-v9";
42+
public static final String MAPBOX_STYLE_OUTDOORS = "outdoors-v9";
43+
public static final String MAPBOX_STYLE_SATELLITE = "satellite-v9";
44+
public static final String MAPBOX_STYLE_SATELLITE_HYBRID = "satellite-streets-v9";
4545

4646
}

libjava/lib/src/main/java/com/mapbox/services/directions/v4/DirectionsCriteria.java

Lines changed: 81 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -8,98 +8,98 @@
88
*/
99
public final class DirectionsCriteria {
1010

11-
/**
12-
* For car and motorcycle routing. This profile shows the fastest routes by preferring
13-
* high-speed roads like highways.
14-
*
15-
* @since 1.0.0
16-
*/
17-
public static final String PROFILE_DRIVING = "mapbox.driving";
11+
/**
12+
* For car and motorcycle routing. This profile shows the fastest routes by preferring
13+
* high-speed roads like highways.
14+
*
15+
* @since 1.0.0
16+
*/
17+
public static final String PROFILE_DRIVING = "mapbox.driving";
1818

19-
/**
20-
* For pedestrian and hiking routing. This profile shows the shortest path by using sidewalks
21-
* and trails.
22-
*
23-
* @since 1.0.0
24-
*/
25-
public static final String PROFILE_WALKING = "mapbox.walking";
19+
/**
20+
* For pedestrian and hiking routing. This profile shows the shortest path by using sidewalks
21+
* and trails.
22+
*
23+
* @since 1.0.0
24+
*/
25+
public static final String PROFILE_WALKING = "mapbox.walking";
2626

27-
/**
28-
* For bicycle routing. This profile shows routes that are short and safe for cyclist, avoiding
29-
* highways and preferring streets with bike lanes.
30-
*
31-
* @since 1.0.0
32-
*/
33-
public static final String PROFILE_CYCLING = "mapbox.cycling";
27+
/**
28+
* For bicycle routing. This profile shows routes that are short and safe for cyclist, avoiding
29+
* highways and preferring streets with bike lanes.
30+
*
31+
* @since 1.0.0
32+
*/
33+
public static final String PROFILE_CYCLING = "mapbox.cycling";
3434

35-
/**
36-
* Format to return route instructions will be text.
37-
*
38-
* @since 1.0.0
39-
*/
40-
public static final String INSTRUCTIONS_TEXT = "text";
35+
/**
36+
* Format to return route instructions will be text.
37+
*
38+
* @since 1.0.0
39+
*/
40+
public static final String INSTRUCTIONS_TEXT = "text";
4141

42-
/**
43-
* Format to return route instructions will be html.
44-
*
45-
* @since 1.0.0
46-
*/
47-
public static final String INSTRUCTIONS_HTML = "html";
42+
/**
43+
* Format to return route instructions will be html.
44+
*
45+
* @since 1.0.0
46+
*/
47+
public static final String INSTRUCTIONS_HTML = "html";
4848

49-
/**
50-
* Format to return route geometry will be geojson.
51-
*
52-
* @since 1.0.0
53-
*/
54-
public static final String GEOMETRY_GEOJSON = "geojson";
49+
/**
50+
* Format to return route geometry will be geojson.
51+
*
52+
* @since 1.0.0
53+
*/
54+
public static final String GEOMETRY_GEOJSON = "geojson";
5555

56-
/**
57-
* Format to return route geometry will be encoded polyline.
58-
*
59-
* @since 1.0.0
60-
*/
61-
public static final String GEOMETRY_POLYLINE = "polyline";
56+
/**
57+
* Format to return route geometry will be encoded polyline.
58+
*
59+
* @since 1.0.0
60+
*/
61+
public static final String GEOMETRY_POLYLINE = "polyline";
6262

63-
/**
64-
* Use false to omit geometry from response.
65-
*
66-
* @since 1.0.0
67-
*/
68-
public static final String GEOMETRY_FALSE = "false";
63+
/**
64+
* Use false to omit geometry from response.
65+
*
66+
* @since 1.0.0
67+
*/
68+
public static final String GEOMETRY_FALSE = "false";
6969

70-
/**
71-
* Normal case
72-
*
73-
* @since 1.0.0
74-
*/
75-
public final static String RESPONSE_OK = "Ok";
70+
/**
71+
* Normal case
72+
*
73+
* @since 1.0.0
74+
*/
75+
public static final String RESPONSE_OK = "Ok";
7676

77-
/**
78-
* The input did not produce any matches. Features will be an empty array.
79-
*
80-
* @since 1.0.0
81-
*/
82-
public final static String RESPONSE_NO_MATCH = "NoMatch";
77+
/**
78+
* The input did not produce any matches. Features will be an empty array.
79+
*
80+
* @since 1.0.0
81+
*/
82+
public static final String RESPONSE_NO_MATCH = "NoMatch";
8383

84-
/**
85-
* There are more than 100 points in the request.
86-
*
87-
* @since 1.0.0
88-
*/
89-
public final static String RESPONSE_TOO_MANY_COORDINATES = "TooManyCoordinates";
84+
/**
85+
* There are more than 100 points in the request.
86+
*
87+
* @since 1.0.0
88+
*/
89+
public static final String RESPONSE_TOO_MANY_COORDINATES = "TooManyCoordinates";
9090

91-
/**
92-
* message will hold an explanation of the invalid input.
93-
*
94-
* @since 1.0.0
95-
*/
96-
public final static String RESPONSE_INVALID_INPUT = "InvalidInput";
91+
/**
92+
* message will hold an explanation of the invalid input.
93+
*
94+
* @since 1.0.0
95+
*/
96+
public static final String RESPONSE_INVALID_INPUT = "InvalidInput";
9797

98-
/**
99-
* Profile should be mapbox.driving, mapbox.walking, or mapbox.cycling.
100-
*
101-
* @since 1.0.0
102-
*/
103-
public final static String RESPONSE_PROFILE_NOT_FOUND = "ProfileNotFound";
98+
/**
99+
* Profile should be mapbox.driving, mapbox.walking, or mapbox.cycling.
100+
*
101+
* @since 1.0.0
102+
*/
103+
public static final String RESPONSE_PROFILE_NOT_FOUND = "ProfileNotFound";
104104

105105
}

libjava/lib/src/main/java/com/mapbox/services/directions/v4/DirectionsService.java

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -15,29 +15,29 @@
1515
*/
1616
public interface DirectionsService {
1717

18-
/**
19-
* Call-based interface
20-
*
21-
* @param userAgent The user.
22-
* @param profile The profile directions should use.
23-
* @param waypoints The waypoints the route should follow.
24-
* @param accessToken Mapbox access token.
25-
* @param alternatives Define whether you want to recieve more then one route.
26-
* @param instructions Define if you'd like to recieve route instructions.
27-
* @param geometry Route geometry.
28-
* @param steps Define if you'd like the route steps.
29-
* @return A retrofit Call object
30-
* @since 1.0.0
31-
*/
32-
@GET("v4/directions/{profile}/{waypoints}.json")
33-
Call<DirectionsResponse> getCall(
34-
@Header("User-Agent") String userAgent,
35-
@Path("profile") String profile,
36-
@Path("waypoints") String waypoints,
37-
@Query("access_token") String accessToken,
38-
@Query("alternatives") Boolean alternatives,
39-
@Query("instructions") String instructions,
40-
@Query("geometry") String geometry,
41-
@Query("steps") Boolean steps
42-
);
18+
/**
19+
* Call-based interface
20+
*
21+
* @param userAgent The user.
22+
* @param profile The profile directions should use.
23+
* @param waypoints The waypoints the route should follow.
24+
* @param accessToken Mapbox access token.
25+
* @param alternatives Define whether you want to recieve more then one route.
26+
* @param instructions Define if you'd like to recieve route instructions.
27+
* @param geometry Route geometry.
28+
* @param steps Define if you'd like the route steps.
29+
* @return A retrofit Call object
30+
* @since 1.0.0
31+
*/
32+
@GET("v4/directions/{profile}/{waypoints}.json")
33+
Call<DirectionsResponse> getCall(
34+
@Header("User-Agent") String userAgent,
35+
@Path("profile") String profile,
36+
@Path("waypoints") String waypoints,
37+
@Query("access_token") String accessToken,
38+
@Query("alternatives") Boolean alternatives,
39+
@Query("instructions") String instructions,
40+
@Query("geometry") String geometry,
41+
@Query("steps") Boolean steps
42+
);
4343
}

0 commit comments

Comments
 (0)