Enumeration iter = this.transports.elements(); while ( iter.hasMoreElements() ) { Transporter next = (Transporter)iter.nextElement();
for(Transporter next : transports) {
    public boolean isWeaponBlockedAt( int loc, boolean isRear ) {        // Walk through this entity's transport components;        // check each for blockage in turn.        // Stop after the first match.        Enumeration iter = this.transports.elements();        while ( iter.hasMoreElements() ) {            Transporter next = (Transporter)iter.nextElement();            if ( next.isWeaponBlockedAt( loc, isRear ) ) {                return true;            }        }        // If we got here, none of our transports        // carry a blocking unit at that location.        return false;    }