protected void checkCollectionType(Collection c){
  if (type != null) {
    for (Iterator iter=c.iterator(); iter.hasNext(); ) {
      Object element=iter.next();
      checkType(element);
    }
  }
}

protected void checkCollectionType ( Collection c ) { if ( type != null ) { for ( Iterator iter = c . iterator ( ) ; iter . hasNext ( ) ; ) { Object element = iter . next ( ) ; checkType ( element ) ; } } }
checks that each member of the given collection are of the correct type
