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