~ubuntu-branches/debian/lenny/freecol/lenny

« back to all changes in this revision

Viewing changes to src/net/sf/freecol/common/model/UnitContainer.java

  • Committer: Bazaar Package Importer
  • Author(s): Vincent Fourmond
  • Date: 2008-08-10 16:59:02 UTC
  • mfrom: (1.2.1 upstream) (2.1.4 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080810165902-re61hmmj8w5loebt
Tags: 0.7.4.dfsg+1-1
Pseudo new upstream release to work around dak's 
move-from-contrib-to-main bug.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
 *  Copyright (C) 2002-2007  The FreeCol Team
 
3
 *
 
4
 *  This file is part of FreeCol.
 
5
 *
 
6
 *  FreeCol is free software: you can redistribute it and/or modify
 
7
 *  it under the terms of the GNU General Public License as published by
 
8
 *  the Free Software Foundation, either version 2 of the License, or
 
9
 *  (at your option) any later version.
 
10
 *
 
11
 *  FreeCol is distributed in the hope that it will be useful,
 
12
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
 *  GNU General Public License for more details.
 
15
 *
 
16
 *  You should have received a copy of the GNU General Public License
 
17
 *  along with FreeCol.  If not, see <http://www.gnu.org/licenses/>.
 
18
 */
 
19
 
1
20
package net.sf.freecol.common.model;
2
21
 
3
22
import java.util.ArrayList;
19
38
    @SuppressWarnings("unused")
20
39
    private static Logger logger = Logger.getLogger(Location.class.getName());
21
40
 
22
 
    public static final String COPYRIGHT = "Copyright (C) 2003-2005 The FreeCol Team";
23
 
 
24
 
    public static final String LICENSE = "http://www.gnu.org/licenses/gpl.html";
25
 
 
26
 
    public static final String REVISION = "$Revision: 2108 $";
 
41
 
 
42
 
27
43
 
28
44
    /** The list of units stored in this <code>UnitContainer</code>. */
29
45
    private ArrayList<Unit> units = new ArrayList<Unit>();
257
273
        // Start element:
258
274
        out.writeStartElement(getXMLElementTagName());
259
275
 
260
 
        out.writeAttribute("ID", getID());
 
276
        out.writeAttribute("ID", getId());
261
277
 
262
278
        Iterator<Unit> unitIterator = getUnitIterator();
263
279
        while (unitIterator.hasNext()) {
274
290
     * @param in The input stream with the XML.
275
291
     */
276
292
    protected void readFromXMLImpl(XMLStreamReader in) throws XMLStreamException {
277
 
        setID(in.getAttributeValue(null, "ID"));
 
293
        setId(in.getAttributeValue(null, "ID"));
278
294
 
279
295
        units.clear();
280
296