Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Map<Integer, GeoPoint> mapPoints = new HashMap<Integer, GeoPoint>();
- ArrayList<Integer> keys2 = new ArrayList<Integer>(mapPoints.keySet());
- for (int t =0; t < 50; t ++){
- Collections.shuffle(keys2);
- }
- Map<Integer, GeoPoint> mapPoints = new HashMap<Integer, GeoPoint>();
- System.out.println("before shuffle ");
- Set<Integer> keys = mapPoints.keySet();
- for (int key : keys) {
- System.out.println("key : " + key + " value: " + mapPoints.get(key));
- }
- Collections.shuffle(keys); // don't know why multiple shuffles are required. deck of cards?
- System.out.println("after shuffle ");
- for (int key : keys) {
- System.out.println("key : " + key + " value: " + mapPoints.get(key));
- }
Add Comment
Please, Sign In to add comment