code: public static Location getMax(List<Location> locations) {
  		return scanLocations(locations, new LocationPredicate() {
  			@Override
  			public boolean accept(Location previous, Location current) {
  				int res = current.getEnd().compareTo(previous.getEnd());
  				return res > 0;
  			}
  		});
  	}
docs: Scans through a list of locations to find the Location with the
  highest end