Warning: Can't use blame annotator:
svn blame failed on trunk/src/scriptbuilder/structures/events/UnitEvent.java: ("Can't find a temporary directory: Internal error", 20014)

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

Revision 38, 1.3 KB checked in by bmcguffin, 9 years ago (diff)

Removed the newLine at the end of each openTag method.

RevLine 
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;
11
12/**
13 * Data model for a Unit event. A unit has a status and an ID number, can be
14 * active, and can be the primary response unit.
15 *
16 * @author Bryan McGuffin
17 */
18public class UnitEvent extends ScriptEvent implements I_XML_Writable
19{
20
21    public UnitEvent()
22    {
23        super(ScriptEventType.UNIT_EVENT);
24    }
25
26    public String unitActive = "";
27
28    public String unitPrimary = "";
29
30    public String unitStatus = "";
31
32    public String unitNum = "";
33   
34    @Override
35    public String openTag(String s)
36    {
37        return "<" + s + ">";
38    }
39
40    @Override
41    public String closeTag(String s)
42    {
43        return "</" + s + ">\n";
44    }
45
46    @Override
47    public String emptyTag(String s)
48    {
49        return "<" + s + "/>\n";
50    }
51
52    @Override
53    public String toXML()
54    {
55        return emptyTag(ELEMENT.UNIT.tag+" UnitNum=\""+unitNum+"\" Status=\""
56                +unitStatus+"\" Primary=\""+unitPrimary+"\" Active=\""+unitActive+"\"");
57    }
58
59}
Note: See TracBrowser for help on using the repository browser.