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