public static boolean validateUniquePolymerIDs ( HELM2Notation helm2notation ) { List < String > listPolymerIDs = helm2notation . getPolymerAndGroupingIDs ( ) ; Map < String , String > uniqueId = new HashMap < String , String > ( ) ; for ( String polymerID : listPolymerIDs ) { uniqueId . put ( polymerID , "" ) ; } if ( listPolymerIDs . size ( ) > uniqueId . size ( ) ) { LOG . info ( "Polymer node IDs are not unique" ) ; return false ; } return true ; }
method to check if all existent polymer ids are unique