mikereedell / sunrisesunsetlib-java

Library for computing the sunrise/sunset from GPS coordinates and a date, in Java.
http://mikereedell.github.com/sunrisesunsetlib-java/
Apache License 2.0
299 stars 69 forks source link

Added setters to the location class in order to avoid creating a new SunriseSunsetCalculator every time a new location arrives (useful for mobile devices) #7

Closed ngdelamo closed 10 years ago

ngdelamo commented 10 years ago

In mobile devices, an app may receive new locations quite frequently. Previously, the only way of updating sunrise/sunset times whenever a new location arrived was to instantiate a new SunriseSunsetCalculator object. With this changes, we can just access the SunriseSunsetCalculator's location using "getLocation()", update the coordinates, and calculate again.