e.hasMoreElements() ) { Mounted m = (Mounted)e.nextElement();
e.hasNext() ) { Mounted m = (Mounted)e.next();
    public boolean hasC3MM() {        if (isShutDown() || isOffBoard()) return false;        // Have we already determined that there's no company command master?        if ( C3CompanyMasterIndex == LOC_NONE ) return false;        // Do we need to determine that there's no company command master?        if ( C3CompanyMasterIndex == LOC_DESTROYED ) {            Enumeration e = getEquipment();            while ( C3CompanyMasterIndex == LOC_DESTROYED &&                    e.hasMoreElements() ) {                Mounted m = (Mounted)e.nextElement();                if ( m.getType() instanceof WeaponType &&                     m.getType().hasFlag(WeaponType.F_C3M) &&                     !m.isDestroyed() && !m.isBreached() ) {                    // Now look for the company command master.                    while ( C3CompanyMasterIndex == LOC_DESTROYED &&                            e.hasMoreElements() ) {                        m = (Mounted)e.nextElement();                        if ( m.getType() instanceof WeaponType &&                             m.getType().hasFlag(WeaponType.F_C3M) &&                             !m.isDestroyed() && !m.isBreached() ) {                            // Found the comany command master                            this.C3CompanyMasterIndex = getEquipmentNum( m );                        }                    }                }            }            // If we haven't found the company command master, there is none.            if ( C3CompanyMasterIndex == LOC_DESTROYED ) {                this.C3CompanyMasterIndex = LOC_NONE;                return false;            }        }        Mounted m = getEquipment( this.C3CompanyMasterIndex );        if ( !m.isDestroyed() && !m.isBreached() ) {            return true;        }        return false;    }