Skip to content

Commit

Permalink
updated nullability of Waypoint properties
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasPaczos committed Feb 7, 2022
1 parent 00801ea commit 279329a
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.mapbox.api.directions.v5.models;

import androidx.annotation.Nullable;
import androidx.annotation.NonNull;
import com.google.auto.value.AutoValue;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
Expand Down Expand Up @@ -33,7 +33,7 @@ public static Builder builder() {
* @return string with the name of the way the coordinate snapped to
* @since 1.0.0
*/
@Nullable
@NonNull
public abstract String name();

/**
Expand All @@ -42,7 +42,7 @@ public static Builder builder() {
* @return GeoJson Point representing this waypoint location
* @since 3.0.0
*/
@Nullable
@NonNull
public Point location() {
return Point.fromLngLat(rawLocation()[0], rawLocation()[1]);
}
Expand All @@ -53,7 +53,7 @@ public Point location() {
* @return GeoJson Point representing this waypoint location
* @since 3.0.0
*/
@Nullable
@NonNull
@SerializedName("location")
@SuppressWarnings("mutable")
abstract double[] rawLocation();
Expand Down Expand Up @@ -109,7 +109,7 @@ public abstract static class Builder {
* @return this builder for chaining options together
* @since 3.0.0
*/
public abstract Builder name(@Nullable String name);
public abstract Builder name(@NonNull String name);

/**
* The rawLocation as a double array. Once the {@link DirectionsWaypoint} objects created,
Expand All @@ -122,7 +122,7 @@ public abstract static class Builder {
* @return this builder for chaining options together
* @since 3.0.0
*/
public abstract Builder rawLocation(@Nullable double[] rawLocation);
public abstract Builder rawLocation(@NonNull double[] rawLocation);

/**
* Build a new {@link DirectionsWaypoint} object.
Expand Down

0 comments on commit 279329a

Please sign in to comment.