private List<Coordinate> sortX(List<Coordinate> coordinates) {
		List<Coordinate> sorted = new ArrayList<Coordinate>(coordinates);
		Collections.sort(sorted, new XComparator());
		return sorted;
	}
private List < Coordinate > sortX ( List < Coordinate > coordinates ) { List < Coordinate > sorted = new ArrayList < Coordinate > ( coordinates ) ; Collections . sort ( sorted , new XComparator ( ) ) ; return sorted ; }
Return a new and sorted list of coordinates. They should be sorted by their X values.