SDL_Android/SmartDeviceLinkAndroidProxy - added the correct version of the proxy
[profile/ivi/smartdevicelink.git] / SDL_Android / SmartDeviceLinkProxyAndroid / src / com / smartdevicelink / proxy / rpc / VehicleType.java
1 package com.smartdevicelink.proxy.rpc;\r
2 \r
3 import java.util.Hashtable;\r
4 \r
5 import com.smartdevicelink.proxy.RPCStruct;\r
6 import com.smartdevicelink.proxy.constants.Names;\r
7 \r
8 /**\r
9  * Describes the type of vehicle the mobile phone is connected with.\r
10  * <p><b>Parameter List\r
11  * <table border="1" rules="all">\r
12  *              <tr>\r
13  *                      <th>Name</th>\r
14  *                      <th>Type</th>\r
15  *                      <th>Description</th>\r
16  *                      <th>SmartDeviceLink Ver. Available</th>\r
17  *              </tr>\r
18  *              <tr>\r
19  *                      <td>make</td>\r
20  *                      <td>String</td>\r
21  *                      <td>Make of the vehicle, e.g. Ford\r
22  *                               <ul>\r
23  *                                      <li>Maxlength = 500</li>\r
24  *                               </ul> \r
25  *                      </td>\r
26  *                      <td>SmartDeviceLink 2.0</td>\r
27  *              </tr>\r
28  *              <tr>\r
29  *                      <td>Model</td>\r
30  *                      <td>String</td>\r
31  *                      <td>Model of the vehicle, e.g. Fiesta\r
32  *                               <ul>\r
33  *                                      <li>Maxlength = 500</li>\r
34  *                               </ul> \r
35  *                      </td>\r
36  *                      <td>SmartDeviceLink 2.0</td>\r
37  *              </tr>\r
38  *              <tr>\r
39  *                      <td>modelYear</td>\r
40  *                      <td>String</td>\r
41  *                      <td>Model Year of the vehicle, e.g. 2013\r
42  *                               <ul>\r
43  *                                      <li>Maxlength = 500</li>\r
44  *                               </ul> \r
45  *                      </td>\r
46  *                      <td>SmartDeviceLink 2.0</td>\r
47  *              </tr>\r
48  *              <tr>\r
49  *                      <td>trim</td>\r
50  *                      <td>String</td>\r
51  *                      <td>Trim of the vehicle, e.g. SE\r
52  *                               <ul>\r
53  *                                      <li>Maxlength = 500</li>\r
54  *                               </ul> \r
55  *                      </td>\r
56  *                      <td>SmartDeviceLink 2.0</td>\r
57  *              </tr>\r
58  *  </table>\r
59  * @since SmartDeviceLink 2.0\r
60  */\r
61 public class VehicleType extends RPCStruct {\r
62 \r
63         /**\r
64          * Constructs a newly allocated VehicleType object\r
65          */\r
66     public VehicleType() { }\r
67     \r
68     /**\r
69      * Constructs a newly allocated VehicleType object indicated by the Hashtable parameter\r
70      * @param hash The Hashtable to use\r
71      */\r
72     public VehicleType(Hashtable hash) {\r
73         super(hash);\r
74     }\r
75     \r
76     /**\r
77      * get the make of the vehicle\r
78      * @return the make of the vehicle\r
79      */\r
80     public String getMake() {\r
81         return (String) store.get(Names.make);\r
82     }\r
83     \r
84     /**\r
85      * set the make of the vehicle\r
86      *@param make the make of the vehicle\r
87      */\r
88     public void setMake(String make) {\r
89         if (make != null) {\r
90             store.put(Names.make, make);\r
91         } else {\r
92                 store.remove(Names.make);\r
93         }\r
94     }\r
95     \r
96     /**\r
97      * get the model of the vehicle\r
98      * @return the model of the vehicle\r
99      */\r
100     public String getModel() {\r
101         return (String) store.get(Names.model);\r
102     }\r
103     \r
104     /**\r
105      * set the model of the vehicle\r
106      * @param model the model of the vehicle\r
107      */\r
108     public void setModel(String model) {\r
109         if (model != null) {\r
110             store.put(Names.model, model);\r
111         } else {\r
112                 store.remove(Names.model);\r
113         }\r
114     }\r
115     \r
116     /**\r
117      * get the model year of the vehicle\r
118      * @return the model year of the vehicle\r
119      */\r
120     public String getModelYear() {\r
121         return (String) store.get(Names.modelYear);\r
122     }\r
123     \r
124     /**\r
125      * set the model year of the vehicle\r
126      * @param modelYear the model year of the vehicle\r
127      */\r
128     public void setModelYear(String modelYear) {\r
129         if (modelYear != null) {\r
130             store.put(Names.modelYear, modelYear);\r
131         } else {\r
132                 store.remove(Names.modelYear);\r
133         }\r
134     }\r
135     \r
136     /**\r
137      * get the trim of the vehicle\r
138      * @return the trim of the vehicle\r
139      */\r
140     public String getTrim() {\r
141         return (String) store.get(Names.trim);\r
142     }\r
143     \r
144     /**\r
145      * set the trim of the vehicle\r
146      * @param trim the trim of the vehicle\r
147      */\r
148     public void setTrim(String trim) {\r
149         if (trim != null) {\r
150             store.put(Names.trim, trim);\r
151         } else {\r
152                 store.remove(Names.trim);\r
153         }\r
154     }\r
155 }\r