public static Location getMin ( List < Location > locations ) { return scanLocations ( locations , new LocationPredicate ( ) { @ Override public boolean accept ( Location previous , Location current ) { int res = current . getStart ( ) . compareTo ( previous . getStart ( ) ) ; return res < 0 ; } } ) ; }
Scans through a list of locations to find the Location with the lowest start