@Test public void passMutableLocationListWithNulls() { List<Location> locations = getLocationsWithNulls(); LocationEngineResult result = LocationEngineResult.create(locations); assertForValidInput(result); }
@NonNull public static LocationEngineResult create(@Nullable Location location) { List<Location> locations = new ArrayList<>(); if (location != null) { locations.add(location); } return new LocationEngineResult(locations); }
LocationEngineResult { @NonNull public static LocationEngineResult create(@Nullable Location location) { List<Location> locations = new ArrayList<>(); if (location != null) { locations.add(location); } return new LocationEngineResult(locations); } }
LocationEngineResult { @NonNull public static LocationEngineResult create(@Nullable Location location) { List<Location> locations = new ArrayList<>(); if (location != null) { locations.add(location); } return new LocationEngineResult(locations); } private  LocationEngineResult(List<Location> locations); }
LocationEngineResult { @NonNull public static LocationEngineResult create(@Nullable Location location) { List<Location> locations = new ArrayList<>(); if (location != null) { locations.add(location); } return new LocationEngineResult(locations); } private  LocationEngineResult(List<Location> locations); @NonNull static LocationEngineResult create(@Nullable Location location); @NonNull static LocationEngineResult create(@Nullable List<Location> locations); @Nullable Location getLastLocation(); List<Location> getLocations(); @Nullable static LocationEngineResult extractResult(Intent intent); }
LocationEngineResult { @NonNull public static LocationEngineResult create(@Nullable Location location) { List<Location> locations = new ArrayList<>(); if (location != null) { locations.add(location); } return new LocationEngineResult(locations); } private  LocationEngineResult(List<Location> locations); @NonNull static LocationEngineResult create(@Nullable Location location); @NonNull static LocationEngineResult create(@Nullable List<Location> locations); @Nullable Location getLastLocation(); List<Location> getLocations(); @Nullable static LocationEngineResult extractResult(Intent intent);  }