private static boolean processRadicals ( CharIter iter , CxSmilesState state ) { if ( state . atomRads == null ) state . atomRads = new TreeMap <> ( ) ; CxSmilesState . Radical rad ; switch ( iter . next ( ) ) { case ' ' : rad = CxSmilesState . Radical . Monovalent ; break ; case ' ' : rad = CxSmilesState . Radical . Divalent ; break ; case ' ' : rad = CxSmilesState . Radical . DivalentSinglet ; break ; case ' ' : rad = CxSmilesState . Radical . DivalentTriplet ; break ; case ' ' : rad = CxSmilesState . Radical . Trivalent ; break ; case ' ' : rad = CxSmilesState . Radical . TrivalentDoublet ; break ; case ' ' : rad = CxSmilesState . Radical . TrivalentQuartet ; break ; default : return false ; } if ( ! iter . nextIf ( ' ' ) ) return false ; List < Integer > dest = new ArrayList <> ( 4 ) ; if ( ! processIntList ( iter , COMMA_SEPARATOR , dest ) ) return false ; for ( Integer atomidx : dest ) state . atomRads . put ( atomidx , rad ) ; return true ; }
CXSMILES radicals .