public static Set < ProteinModification > getByComponent ( final Component comp1 , final Component ... comps ) { lazyInit ( ) ; Set < ProteinModification > mods = byComponent . get ( comp1 ) ; if ( mods == null ) { return Collections . emptySet ( ) ; } if ( comps . length == 0 ) { return Collections . unmodifiableSet ( mods ) ; } else { Set < ProteinModification > ret = new HashSet < ProteinModification > ( mods ) ; for ( Component comp : comps ) { mods = byComponent . get ( comp ) ; if ( mods == null ) { return Collections . emptySet ( ) ; } else { ret . retainAll ( mods ) ; } } return ret ; } }
Get ProteinModifications that involves one or more components .