Enumeration     misc = null; Mounted         equip = null;
    public boolean checkForMagneticClamp() {        // Declare local variables.        Player          player = null;        Entity          unit = null;        boolean         result;        Hashtable       playerFlags = null;        Enumeration     misc = null;        Mounted         equip = null;        String          name = null;        // Assume that we don't need new transporters.        result = false;        // Create a map of flags for the players.        playerFlags = new Hashtable( this.getNoOfPlayers() );        // Walk through the game's entities.        for (Enumeration i = entities.elements(); i.hasMoreElements();) {            // Is the next unit a Battle Armor squad?            unit = (Entity)i.nextElement();            if ( unit instanceof BattleArmor ) {                // Does the unit have a Magnetic Clamp?                misc = unit.getMisc();                while ( misc.hasMoreElements() ) {                    equip = (Mounted) misc.nextElement();                    name = equip.getType().getInternalName();                    if ( BattleArmor.MAGNETIC_CLAMP.equals( name ) ){                        // The unit's player needs new transporters.                        result = true;                        playerFlags.put( unit.getOwner(), Boolean.TRUE );                        // Stop looking.                        break;                    }                }            } // End unit-is-BattleArmor        } // Handle the next entity.        // Do we need to add any Magnetic Clamp transporters?        if ( result ) {            // Walk through the game's entities again.            for (Enumeration i = entities.elements(); i.hasMoreElements();) {                // Get this unit's player.                unit = (Entity)i.nextElement();                player = unit.getOwner();                // Does this player need updated transporters?                if ( Boolean.TRUE.equals( playerFlags.get(player) ) ) {                    // Add the appropriate transporter to the unit.                    if ( !unit.isOmni() && unit instanceof Mech ) {                        unit.addTransporter( new ClampMountMech() );                    }                    else if ( unit instanceof Tank ) {                        unit.addTransporter( new ClampMountTank() );                    }                }            } // End player-needs-transports        } // Handle the next unit.        // Return the result.        return result;    } // End private boolean checkForMagneticClamp()