View Javadoc

1   
2   	 	/**
3            IMPORTANT !!!
4   
5            DO NOT EDIT THIS FILE. IT IS GENERATED FROM approriate xml file in xmlresources/gbcommands BY
6            THE JavaClassesGenerator.xslt. MODIFY THAT FILE INSTEAD OF THIS ONE.
7            
8            Use Ant task process-gb-messages after that to generate .java files again.
9            
10           IMPORTANT END !!!
11          */
12   	package cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands;import java.util.*;import javax.vecmath.*;import cz.cuni.amis.pogamut.base.communication.messages.*;import cz.cuni.amis.pogamut.base.communication.worldview.*;import cz.cuni.amis.pogamut.base.communication.worldview.event.*;import cz.cuni.amis.pogamut.base.communication.worldview.object.*;import cz.cuni.amis.pogamut.multi.communication.worldview.object.*;import cz.cuni.amis.pogamut.base.communication.translator.event.*;import cz.cuni.amis.pogamut.multi.communication.translator.event.*;import cz.cuni.amis.pogamut.base3d.worldview.object.*;import cz.cuni.amis.pogamut.base3d.worldview.object.event.*;import cz.cuni.amis.pogamut.ut2004.communication.messages.*;import cz.cuni.amis.pogamut.ut2004.communication.worldview.objects.*;import cz.cuni.amis.pogamut.ut2004multi.communication.worldview.objects.*;import cz.cuni.amis.pogamut.ut2004.communication.translator.itemdescriptor.*;import cz.cuni.amis.pogamut.ut2004.communication.messages.ItemType.Category;import cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId;import cz.cuni.amis.utils.exception.*;import cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdateResult.Result;import cz.cuni.amis.utils.SafeEquals;import cz.cuni.amis.pogamut.base.agent.*;import cz.cuni.amis.pogamut.multi.agent.*;import cz.cuni.amis.pogamut.multi.communication.worldview.property.*;import cz.cuni.amis.pogamut.ut2004multi.communication.worldview.property.*;import cz.cuni.amis.utils.token.*;import cz.cuni.amis.utils.*;
13   		/**
14   		 * Representation of the GameBots2004 command GETITC.
15   		 *
16   		 * 
17  		Request to export item category by ITC message. Will respond with ITC message.
18  	
19           */
20   	public class GetItemCategory 
21  		extends CommandMessage
22  	        {
23  	        	
24  		        
25      	/** Example how the message looks like - used during parser tests. */
26      	public static final String PROTOTYPE =
27      		" {Type text} ";
28      
29  		/**
30  		 * Creates new instance of command GetItemCategory.
31  		 * 
32  		Request to export item category by ITC message. Will respond with ITC message.
33  	
34  		 * Corresponding GameBots message for this command is
35  		 * GETITC.
36  		 *
37  		 * 
38  		 *    @param Type 
39  			Class of the item we want to export ITC message for. Must be pickup class (e.g.
40  			xWeapons.FlakCannonPickup).
41  		
42  		 */
43  		public GetItemCategory(
44  			String Type
45  		) {
46  			
47  				this.Type = Type;
48              
49  		}
50  
51  		
52  			/**
53  			 * Creates new instance of command GetItemCategory.
54  			 * 
55  		Request to export item category by ITC message. Will respond with ITC message.
56  	
57  			 * Corresponding GameBots message for this command is
58  			 * GETITC.
59  			 * <p></p>
60  			 * WARNING: this is empty-command constructor, you have to use setters to fill it up with data that should be sent to GameBots2004!
61  		     */
62  		    public GetItemCategory() {
63  		    }
64  			
65  		
66  		/**
67  		 * Cloning constructor.
68  		 *
69  		 * @param original
70  		 */
71  		public GetItemCategory(GetItemCategory original) {
72  		   
73  		        this.Type = original.Type;
74  		   
75  		}
76      
77  	        /**
78  	        
79  			Class of the item we want to export ITC message for. Must be pickup class (e.g.
80  			xWeapons.FlakCannonPickup).
81  		 
82  	        */
83  	        protected
84  	         String Type =
85  	       	
86  	        		null
87  	        	;
88  	
89  	        
90  	        
91   		/**
92           * 
93  			Class of the item we want to export ITC message for. Must be pickup class (e.g.
94  			xWeapons.FlakCannonPickup).
95  		 
96           */
97          public String getType()
98   	
99  	        {
100 	            return
101 	        	 Type;
102 	        }
103 	        
104 	        
105 	        
106  		
107  		/**
108          * 
109 			Class of the item we want to export ITC message for. Must be pickup class (e.g.
110 			xWeapons.FlakCannonPickup).
111 		 
112          */
113         public GetItemCategory 
114         setType(String Type)
115  	
116 			{
117 				this.Type = Type;
118 				return this;
119 			}
120 		
121  	    public String toString() {
122             return toMessage();
123         }
124  	
125  		public String toHtmlString() {
126 			return super.toString() + "[<br/>" +
127             	
128             	"<b>Type</b> = " +
129             	String.valueOf(getType()
130  	) +
131             	" <br/> " +
132             	 
133             	"<br/>]"
134             ;
135 		}
136  	
137 		public String toMessage() {
138      		StringBuffer buf = new StringBuffer();
139      		buf.append("GETITC");
140      		
141 						if (Type != null) {
142 							buf.append(" {Type " + Type + "}");
143 						}
144 					
145    			return buf.toString();
146    		}
147  	
148  		// --- Extra Java from XML BEGIN (extra/code/java)
149         	
150 		// --- Extra Java from XML END (extra/code/java)
151  	
152 	        }
153