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 PUT.
15   		 *
16   		 * 
17  		Bot putdowns input item at the location he is currently at. Note that If autopickup is set to true he will pick it up immediately back.
18  	
19           */
20   	public class PutDownItem 
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 PutDownItem.
31  		 * 
32  		Bot putdowns input item at the location he is currently at. Note that If autopickup is set to true he will pick it up immediately back.
33  	
34  		 * Corresponding GameBots message for this command is
35  		 * PUT.
36  		 *
37  		 * 
38  		 *    @param Type 
39  			Class of the item. E.g. "GBEmohawk.ItemBall" (without quotes).
40  		
41  		 */
42  		public PutDownItem(
43  			String Type
44  		) {
45  			
46  				this.Type = Type;
47              
48  		}
49  
50  		
51  			/**
52  			 * Creates new instance of command PutDownItem.
53  			 * 
54  		Bot putdowns input item at the location he is currently at. Note that If autopickup is set to true he will pick it up immediately back.
55  	
56  			 * Corresponding GameBots message for this command is
57  			 * PUT.
58  			 * <p></p>
59  			 * WARNING: this is empty-command constructor, you have to use setters to fill it up with data that should be sent to GameBots2004!
60  		     */
61  		    public PutDownItem() {
62  		    }
63  			
64  		
65  		/**
66  		 * Cloning constructor.
67  		 *
68  		 * @param original
69  		 */
70  		public PutDownItem(PutDownItem original) {
71  		   
72  		        this.Type = original.Type;
73  		   
74  		}
75      
76  	        /**
77  	        
78  			Class of the item. E.g. "GBEmohawk.ItemBall" (without quotes).
79  		 
80  	        */
81  	        protected
82  	         String Type =
83  	       	
84  	        		null
85  	        	;
86  	
87  	        
88  	        
89   		/**
90           * 
91  			Class of the item. E.g. "GBEmohawk.ItemBall" (without quotes).
92  		 
93           */
94          public String getType()
95   	
96  	        {
97  	            return
98  	        	 Type;
99  	        }
100 	        
101 	        
102 	        
103  		
104  		/**
105          * 
106 			Class of the item. E.g. "GBEmohawk.ItemBall" (without quotes).
107 		 
108          */
109         public PutDownItem 
110         setType(String Type)
111  	
112 			{
113 				this.Type = Type;
114 				return this;
115 			}
116 		
117  	    public String toString() {
118             return toMessage();
119         }
120  	
121  		public String toHtmlString() {
122 			return super.toString() + "[<br/>" +
123             	
124             	"<b>Type</b> = " +
125             	String.valueOf(getType()
126  	) +
127             	" <br/> " +
128             	 
129             	"<br/>]"
130             ;
131 		}
132  	
133 		public String toMessage() {
134      		StringBuffer buf = new StringBuffer();
135      		buf.append("PUT");
136      		
137 						if (Type != null) {
138 							buf.append(" {Type " + Type + "}");
139 						}
140 					
141    			return buf.toString();
142    		}
143  	
144  		// --- Extra Java from XML BEGIN (extra/code/java)
145         	
146 		// --- Extra Java from XML END (extra/code/java)
147  	
148 	        }
149