Vector hexes = new Vector();
Vector<IHex> hexes = new Vector<IHex>();
    private static void placeBuilding(IBoard board, BuildingTemplate building) {        int type = building.getType();        int cf = building.getCF();        int height = building.getHeight();        ITerrainFactory tf = Terrains.getTerrainFactory();        Vector hexes = new Vector();        int level=0;        for(Enumeration i=building.getCoords();i.hasMoreElements();) {            Coords c = (Coords)i.nextElement();            IHex hex = board.getHex(c);            //work out exits...            int exits = 0;            for (int dir=0;dir<6;dir++) {                if (building.containsCoords(c.translated(dir))) {                    exits |= (1<<dir);                }            }            //remove everything            hex.removeAllTerrains();            hex.addTerrain(tf.createTerrain(Terrains.PAVEMENT, 1));            hex.addTerrain(tf.createTerrain(Terrains.BUILDING, type, true, exits));            hex.addTerrain(tf.createTerrain(Terrains.BLDG_CF, cf));            hex.addTerrain(tf.createTerrain(Terrains.BLDG_ELEV, height));            //hex.addTerrain(tf.createTerrain(Terrains.BLDG_BASEMENT, building.getBasement()));            hexes.addElement(hex);            level += hex.getElevation();        }        //set everything to the same level        for(int j=0;j<hexes.size();j++) {            ((IHex)(hexes.elementAt(j))).setElevation(level / hexes.size());        }    }