@Test public void validateLatitudeTest() { CoordinatesUtil.validateLatitude(CoordinatesUtil.LATITUDE_MAX); CoordinatesUtil.validateLatitude(CoordinatesUtil.LATITUDE_MIN); verifyInvalidLatitude(Double.NaN); verifyInvalidLatitude(Math.nextAfter(CoordinatesUtil.LATITUDE_MAX, Double.POSITIVE_INFINITY)); verifyInvalidLatitude(Math.nextAfter(CoordinatesUtil.LATITUDE_MIN, Double.NEGATIVE_INFINITY)); }
public static void validateLatitude(double latitude) { if (Double.isNaN(latitude) || latitude < LATITUDE_MIN || latitude > LATITUDE_MAX) { throw new IllegalArgumentException("invalid latitude: " + latitude); } }
CoordinatesUtil { public static void validateLatitude(double latitude) { if (Double.isNaN(latitude) || latitude < LATITUDE_MIN || latitude > LATITUDE_MAX) { throw new IllegalArgumentException("invalid latitude: " + latitude); } } }
CoordinatesUtil { public static void validateLatitude(double latitude) { if (Double.isNaN(latitude) || latitude < LATITUDE_MIN || latitude > LATITUDE_MAX) { throw new IllegalArgumentException("invalid latitude: " + latitude); } } private  CoordinatesUtil(); }
CoordinatesUtil { public static void validateLatitude(double latitude) { if (Double.isNaN(latitude) || latitude < LATITUDE_MIN || latitude > LATITUDE_MAX) { throw new IllegalArgumentException("invalid latitude: " + latitude); } } private  CoordinatesUtil(); static int degreesToMicrodegrees(double coordinate); static double microdegreesToDegrees(int coordinate); static double[] parseCoordinateString(String coordinatesString, int numberOfCoordinates); static void validateLatitude(double latitude); static void validateLongitude(double longitude); }
CoordinatesUtil { public static void validateLatitude(double latitude) { if (Double.isNaN(latitude) || latitude < LATITUDE_MIN || latitude > LATITUDE_MAX) { throw new IllegalArgumentException("invalid latitude: " + latitude); } } private  CoordinatesUtil(); static int degreesToMicrodegrees(double coordinate); static double microdegreesToDegrees(int coordinate); static double[] parseCoordinateString(String coordinatesString, int numberOfCoordinates); static void validateLatitude(double latitude); static void validateLongitude(double longitude); static final double LATITUDE_MAX; static final double LATITUDE_MIN; static final double LONGITUDE_MAX; static final double LONGITUDE_MIN; }