@ Override public int getMonomerCount ( ) { Iterator < String > keys = strands . keySet ( ) . iterator ( ) ; int number = 0 ; if ( ! keys . hasNext ( ) ) // no strands return super . getMonomerCount ( ) ; while ( keys . hasNext ( ) ) { Strand tmp = ( Strand ) strands . get ( keys . next ( ) ) ; // Cast exception?! number += ( tmp . getMonomers ( ) ) . size ( ) - 1 ; } return number ; }
Returns the number of monomers present in BioPolymer .