private static List < EntityInfo > findUniqueEntities ( TreeMap < String , EntityInfo > chainIds2entities ) { List < EntityInfo > list = new ArrayList < EntityInfo > ( ) ; for ( EntityInfo cluster : chainIds2entities . values ( ) ) { boolean present = false ; for ( EntityInfo cl : list ) { if ( cl == cluster ) { present = true ; break ; } } if ( ! present ) list . add ( cluster ) ; } return list ; }
Utility method to obtain a list of unique entities from the chainIds2entities map