public int getChildCount ( Class < ? extends ElementBase > clazz ) { if ( clazz == ElementBase . class ) { return getChildCount ( ) ; } int count = 0 ; for ( ElementBase child : children ) { if ( clazz . isInstance ( child ) ) { count ++ ; } } return count ; }
Returns the number of children .