public static boolean consistentAccessions ( List < Location > subLocations ) { Set < AccessionID > set = new HashSet < AccessionID > ( ) ; for ( Location sub : subLocations ) { set . add ( sub . getAccession ( ) ) ; } return set . size ( ) == 1 ; }
Scans a list of locations and returns true if all the given locations are linked to the same sequence . A list of null accessioned locations is the same as a list where the accession is the same