Iterator iter = this.transports.iterator(); while ( iter.hasNext() ) { Transporter next = (Transporter)iter.next();
Enumeration iter = this.transports.elements(); while ( iter.hasMoreElements() ) { Transporter next = (Transporter)iter.nextElement();
    public boolean canLoad( Entity unit ) {	// Walk through this entity's transport components;	// if one of them can load the unit, we can.	Iterator iter = this.transports.iterator();	while ( iter.hasNext() ) {	    Transporter next = (Transporter)iter.next();	    if ( next.canLoad( unit ) ) {		return true;	    }	}	// If we got here, none of our transports can carry the unit.	return false;    }