I do this on Android with Google Maps.
I have an arraylist of GeoPoint's. GeoPoint API is here.
List<GeoPoint> geoPoints;
Now I want to check the frequency of each GeoPoint. If there is some intersect (because two of them are equal) I want to print out a debug log.
Collections.frequency(geoPoints, geoPoints.get(i));
doesn't return me the correct result, it doesn't check if two points intersect...