[android] - add NonNull to MapboxMap parameter for onMapReady callback, removes necessity to add question mark to all mapboxMap invocations
This commit is contained in:
@@ -123,7 +123,7 @@ public final class MapFragment extends Fragment implements OnMapReadyCallback {
|
||||
* @param mapboxMap The public api controller of the map
|
||||
*/
|
||||
@Override
|
||||
public void onMapReady(MapboxMap mapboxMap) {
|
||||
public void onMapReady(@NonNull MapboxMap mapboxMap) {
|
||||
this.mapboxMap = mapboxMap;
|
||||
for (OnMapReadyCallback onMapReadyCallback : mapReadyCallbackList) {
|
||||
onMapReadyCallback.onMapReady(mapboxMap);
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.mapbox.mapboxsdk.maps;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
|
||||
/**
|
||||
* Interface definition for a callback to be invoked when the map is ready to be used.
|
||||
* <p>
|
||||
@@ -16,5 +18,5 @@ public interface OnMapReadyCallback {
|
||||
* @param mapboxMap An instance of MapboxMap associated with the {@link MapFragment} or
|
||||
* {@link MapView} that defines the callback.
|
||||
*/
|
||||
void onMapReady(MapboxMap mapboxMap);
|
||||
void onMapReady(@NonNull MapboxMap mapboxMap);
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ public class SupportMapFragment extends Fragment implements OnMapReadyCallback {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMapReady(MapboxMap mapboxMap) {
|
||||
public void onMapReady(@NonNull MapboxMap mapboxMap) {
|
||||
this.mapboxMap = mapboxMap;
|
||||
for (OnMapReadyCallback onMapReadyCallback : mapReadyCallbackList) {
|
||||
onMapReadyCallback.onMapReady(mapboxMap);
|
||||
|
||||
Reference in New Issue
Block a user