com.what3words.javawrapper.response.Square Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of w3w-java-wrapper Show documentation
Show all versions of w3w-java-wrapper Show documentation
Java library for what3words REST API.
The newest version!
package com.what3words.javawrapper.response;
import com.what3words.javawrapper.request.BoundingBox;
public class Square {
private Coordinates southwest;
private Coordinates northeast;
public Square(double neLat, double neLng, double swLat, double swLng) {
southwest = new Coordinates(swLat, swLng);
northeast = new Coordinates(neLat, neLng);
}
public Square(BoundingBox box) {
southwest = new Coordinates(box.sw.lat, box.sw.lng);
northeast = new Coordinates(box.ne.lat, box.ne.lng);
}
public Coordinates getSouthwest() {
return southwest;
}
public Coordinates getNortheast() {
return northeast;
}
}