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 KICK.
15   		 *
16   		 * 
17  		Will kick GameBots Bot from the server.
18  	
19           */
20   	public class Kick 
21  		extends CommandMessage
22  	        {
23  	        	
24  		        
25      	/** Example how the message looks like - used during parser tests. */
26      	public static final String PROTOTYPE =
27      		" {Id unreal_id} ";
28      
29  		/**
30  		 * Creates new instance of command Kick.
31  		 * 
32  		Will kick GameBots Bot from the server.
33  	
34  		 * Corresponding GameBots message for this command is
35  		 * KICK.
36  		 *
37  		 * 
38  		 *    @param Id Id of the bot to be kicked.
39  		 */
40  		public Kick(
41  			UnrealId Id
42  		) {
43  			
44  				this.Id = Id;
45              
46  		}
47  
48  		
49  			/**
50  			 * Creates new instance of command Kick.
51  			 * 
52  		Will kick GameBots Bot from the server.
53  	
54  			 * Corresponding GameBots message for this command is
55  			 * KICK.
56  			 * <p></p>
57  			 * WARNING: this is empty-command constructor, you have to use setters to fill it up with data that should be sent to GameBots2004!
58  		     */
59  		    public Kick() {
60  		    }
61  			
62  		
63  		/**
64  		 * Cloning constructor.
65  		 *
66  		 * @param original
67  		 */
68  		public Kick(Kick original) {
69  		   
70  		        this.Id = original.Id;
71  		   
72  		}
73      
74  	        /**
75  	        Id of the bot to be kicked. 
76  	        */
77  	        protected
78  	         UnrealId Id =
79  	       	
80  	        		null
81  	        	;
82  	
83  	        
84  	        
85   		/**
86           * Id of the bot to be kicked. 
87           */
88          public UnrealId getId()
89   	
90  	        {
91  	            return
92  	        	 Id;
93  	        }
94  	        
95  	        
96  	        
97   		
98   		/**
99           * Id of the bot to be kicked. 
100          */
101         public Kick 
102         setId(UnrealId Id)
103  	
104 			{
105 				this.Id = Id;
106 				return this;
107 			}
108 		
109  	    public String toString() {
110             return toMessage();
111         }
112  	
113  		public String toHtmlString() {
114 			return super.toString() + "[<br/>" +
115             	
116             	"<b>Id</b> = " +
117             	String.valueOf(getId()
118  	) +
119             	" <br/> " +
120             	 
121             	"<br/>]"
122             ;
123 		}
124  	
125 		public String toMessage() {
126      		StringBuffer buf = new StringBuffer();
127      		buf.append("KICK");
128      		
129 						if (Id != null) {
130 							buf.append(" {Id " + Id.getStringId() + "}");
131 						}
132 					
133    			return buf.toString();
134    		}
135  	
136  		// --- Extra Java from XML BEGIN (extra/code/java)
137         	
138 		// --- Extra Java from XML END (extra/code/java)
139  	
140 	        }
141