Vector vEnemyCoords = new Vector(16); Vector vECMRanges = new Vector(16); for (Enumeration e = ae.game.getEntities(); e.hasMoreElements();) { Entity ent = (Entity) e.nextElement();
Vector<Coords> vEnemyCoords = new Vector(16); Vector<Integer> vECMRanges = new Vector(16); for (Object eEl : ae.game.getEntitiesVector()) { Entity ent = (Entity)eEl;
    public static boolean isAffectedByAngelECM(Entity ae, Coords a, Coords b) {        if (a == null || b == null)            return false;        // Only grab enemies with active Angel ECM        Vector vEnemyCoords = new Vector(16);        Vector vECMRanges = new Vector(16);        for (Enumeration e = ae.game.getEntities(); e.hasMoreElements();) {            Entity ent = (Entity) e.nextElement();            Coords entPos = ent.getPosition();            if (ent.isEnemyOf(ae)                    && ent.hasActiveAngelECM()                    && entPos != null) {                // TODO : only use the best ECM range in a given Coords.                vEnemyCoords.addElement(entPos);                vECMRanges.addElement(new Integer(ent.getAngelECMRange()));            }            // Check the ECM effects of the entity's passengers.            Vector passengers = ent.getLoadedUnits();            Enumeration iter = passengers.elements();            while (iter.hasMoreElements()) {                Entity other = (Entity) iter.nextElement();                if (other.isEnemyOf(ae) && other.hasActiveAngelECM()                        && entPos != null) {                    // TODO : only use the best ECM range in a given Coords.                    vEnemyCoords.addElement(entPos);                    vECMRanges.addElement(new Integer(other.getAngelECMRange()));                }            }        }        // none? get out of here        if (vEnemyCoords.size() == 0)            return false;        // get intervening Coords. See the comments for intervening() and        // losDivided()        Coords[] coords = Coords.intervening(a, b);        boolean bDivided = (a.degree(b) % 60 == 30);        Enumeration ranges = vECMRanges.elements();        for (Enumeration e = vEnemyCoords.elements(); e.hasMoreElements();) {            Coords c = (Coords) e.nextElement();            int range = ((Integer) ranges.nextElement()).intValue();            int nLastDist = -1;            // loop through intervening hexes and see if any of them are within            // range            for (int x = 0; x < coords.length; x++) {                int nDist = c.distance(coords[x]);                if (nDist <= range)                    return true;                // optimization. if we're getting farther away, forget it                // but ignore the doubled-up hexes intervening() adds along                // hexlines                if (!bDivided || (x % 3 == 0)) {                    if (nLastDist == -1) {                        nLastDist = nDist;                    } else if (nDist > nLastDist) {                        break;                    }                }            }        }        return false;    }