source: tmcsimulator-scriptbuilder/trunk/src/scriptbuilder/structures/events/UnitEvent.java @ 76

Revision 76, 1.1 KB checked in by bmcguffin, 9 years ago (diff)

Added javadoc for several files.

Line 
1/*
2 * To change this license header, choose License Headers in Project Properties.
3 * To change this template file, choose Tools | Templates
4 * and open the template in the editor.
5 */
6package scriptbuilder.structures.events;
7
8import scriptbuilder.structures.ELEMENT;
9import scriptbuilder.structures.I_XML_Writable;
10import scriptbuilder.structures.ScriptEvent;
11import scriptbuilder.structures.XMLWriter;
12
13/**
14 * Data model for a Unit event. A unit has a status and an ID number, can be
15 * active, and can be the primary response unit.
16 *
17 * @author Bryan McGuffin
18 */
19public class UnitEvent extends ScriptEvent implements I_XML_Writable
20{
21
22    /**
23     * Constructor.
24     */
25    public UnitEvent()
26    {
27        super(ScriptEventType.UNIT_EVENT);
28    }
29
30    public String unitActive = "";
31
32    public String unitPrimary = "";
33
34    public String unitStatus = "";
35
36    public String unitNum = "";
37    @Override
38    public String toXML()
39    {
40        return XMLWriter.emptyTag(ELEMENT.UNIT.tag+" UnitNum=\""+unitNum+"\" Status=\""
41                +unitStatus+"\" Primary=\""+unitPrimary+"\" Active=\""+unitActive+"\"");
42    }
43
44}
Note: See TracBrowser for help on using the repository browser.