private static boolean familyHalogen ( IAtom atom ) { String symbol = atom . getSymbol ( ) ; if ( symbol . equals ( "F" ) || symbol . equals ( "Cl" ) || symbol . equals ( "Br" ) || symbol . equals ( "I" ) ) return true ; else return false ; }
Looking if the IAtom belongs to the halogen family . The IAtoms are F Cl Br I .