Getting values out of java callbacks
<p>I have a method below which converts an address to longtitude/latitude. LatLng is a Google Maps API class and LonLat is my own custom util class.</p>

<p>The below wont work because I cant set the variable coords within the callback method. I am unsure how I get the value out. It is probably very simple but its confusing me.</p>

<p>Thanks in advance.</p>

<pre><code>public LonLat convert(String address) {
    LonLat coords;
    geocoder.getLatLng(address, new LatLngCallback() {
        public void onFailure() {
            // TODO Exception handling

        }

        @Override
        public void onSuccess(LatLng point) {
            coords = new LonLat(point.getLongitude(), point.getLatitude());
        }

    });
    return coords;
}
</code></pre>
