All Downloads are FREE. Search and download functionalities are using the official Maven repository.

uk.co.codera.geo.Locator Maven / Gradle / Ivy

There is a newer version: 0.0.85
Show newest version
package uk.co.codera.geo;

import java.util.List;
import java.util.stream.Collectors;

public class Locator {

    public Locator() {
        super();
    }

    public  List findWithinStraightLineDistance(List destinations,
            CartesianCoordinate currentLocation, Distance distance) {
        return destinations.stream().filter(d -> d.getLocation().straightLineDistanceBetween(currentLocation)
                .getDistance().compareTo(distance.getDistance()) < 0).collect(Collectors.toList());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy