/*
 * This source file is subject to the license that is bundled with this package in the file LICENSE.
 */
package com.montealegreluis.yelpv3.businesses;

import org.json.JSONObject;

public class Coordinates {
    private final double latitude;
    private final double longitude;

    public static Coordinates from(JSONObject coordinates) {
        return new Coordinates(coordinates);
    }

    public double latitude() {
        return latitude;
    }

    public double longitude() {
        return longitude;
    }

    private Coordinates(JSONObject coordinates) {
        latitude = !coordinates.isNull("latitude") ? coordinates.getDouble("latitude") : 0;
        longitude = !coordinates.isNull("longitude") ? coordinates.getDouble("longitude") : 0;
    }
}

@@ -206,30 +206,29 @@
 ates %7B%0A    p
-rivate
+ublic
  final doubl
@@ -244,22 +244,21 @@
 e;%0A    p
-rivate
+ublic
  final d
@@ -392,136 +392,8 @@
  %7D%0A%0A
-    public double latitude() %7B%0A        return latitude;%0A    %7D%0A%0A    public double longitude() %7B%0A        return longitude;%0A    %7D%0A%0A
     

Remove getters from Coordinates