Obtain the first id from a sorted Array through Comparator
<p>I use the following method to sort an array from an sqlite database:</p>

<pre><code>public void sortNearby(final double lat, final double lng) {
        Arrays.sort(videoLocationsDB, new Comparator&lt;VideoLocationDB&gt;() {

            @Override
            public int compare(VideoLocationDB lhs, VideoLocationDB rhs) {

                double lat1 = lhs.latitude;
                double lng1 = lhs.longitude;

                double lat2 = rhs.latitude;
                double lng2 = rhs.longitude;

                double lhsDistance = countDistance(lat, lng, lat1, lng1);
                double rhsDistance = countDistance(lat, lng, lat2, lng2);
                if (lhsDistance &lt; rhsDistance)
                    return -1;
                else if (lhsDistance &gt; rhsDistance)
                    return 1;
                else
                    return 0;
            }
        });
        videoLocationAdapter.notifyDataSetChanged();
    }
</code></pre>

<p>How can I obtain the Id of the first object from the sorted array? for example I need to get <code>VideoLocationDB.id</code> of the first object</p>
