private static int nStereoBonds ( List < IBond > bonds ) { int count = 0 ; for ( IBond bond : bonds ) { IBond . Stereo stereo = bond . getStereo ( ) ; switch ( stereo ) { // query bonds... no configuration possible case E_OR_Z : case UP_OR_DOWN : case UP_OR_DOWN_INVERTED : return - 1 ; case UP : case DOWN : case UP_INVERTED : case DOWN_INVERTED : count ++ ; break ; } } return count ; }
access the number of stereo bonds in the provided bond list .