summaryrefslogtreecommitdiff
path: root/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/StartTime.java
blob: bce0b9fc132693b0d1867246da6afff0a42cac75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
package com.smartdevicelink.proxy.rpc;

import java.util.Hashtable;

import com.smartdevicelink.proxy.RPCStruct;

/**
 * Describes the hour, minute and second values used to set the media clock.
 * <p><b> Parameter List</b></p>
 * <table border="1" rules="all">
 * 		<tr>
 * 			<th>Name</th>
 * 			<th>Type</th>
 * 			<th>Description</th>
 * 			<th>SmartDeviceLink Ver. Available</th>
 * 		</tr>
 * 		<tr>
 * 			<td>hours</td>
 * 			<td>Integer</td>
 * 			<td>The hour. Minvalue="0", maxvalue="59"
 *					<p><b>Note:</b></p>Some display types only support a max value of 19. If out of range, it will be rejected.
 *			</td>
 * 			<td>SmartDeviceLink 1.0</td>
 * 		</tr>
  * 		<tr>
 * 			<td>minutes</td>
 * 			<td>Integer</td>
 * 			<td>The minute. Minvalue="0", maxvalue="59".</td>
 * 			<td>SmartDeviceLink 1.0</td>
 * 		</tr>
 *     <tr>
 * 			<td>seconds</td>
 * 			<td>Integer</td>
 * 			<td>The second. Minvalue="0", maxvalue="59".</td>
 * 			<td>SmartDeviceLink 1.0</td>
 * 		</tr>
 * </table>
 * @since SmartDeviceLink 1.0
 */
public class StartTime extends RPCStruct {
	public static final String KEY_MINUTES = "minutes";
	public static final String KEY_SECONDS = "seconds";
	public static final String KEY_HOURS = "hours";

	/**
	 * Constructs a newly allocated StartTime object
	 */
	public StartTime() { }
    /**
     * Constructs a newly allocated StartTime object indicated by the Hashtable parameter
     * @param hash The Hashtable to use
     */
    public StartTime(Hashtable<String, Object> hash) {
        super(hash);
    }
    /**
     * Get the hour. Minvalue="0", maxvalue="59"
 *					<p><b>Note:</b></p>Some display types only support a max value of 19. If out of range, it will be rejected.
     * @return hours Minvalue="0", maxvalue="59"
     */    
    public Integer getHours() {
        return (Integer) store.get( KEY_HOURS );
    }
    /**
     * Set the hour. Minvalue="0", maxvalue="59"
 *					<p><b>Note:</b></p>Some display types only support a max value of 19. If out of range, it will be rejected.
     * @param hours min: 0; max: 59
     */    
    public void setHours( Integer hours ) {
        if (hours != null) {
            store.put(KEY_HOURS, hours );
        } else {
        	store.remove(KEY_HOURS);
        }
    }
    /**
     * Get the minute. Minvalue="0", maxvalue="59".
     * @return minutes Minvalue="0", maxvalue="59"
     */    
    public Integer getMinutes() {
        return (Integer) store.get( KEY_MINUTES );
    }
    /**
     * Set the minute. Minvalue="0", maxvalue="59".
     * @param minutes min: 0; max: 59
     */    
    public void setMinutes( Integer minutes ) {
        if (minutes != null) {
            store.put(KEY_MINUTES, minutes );
        } else {
        	store.remove(KEY_MINUTES);
        }
    }
    /**
     * Get the second. Minvalue="0", maxvalue="59".
     * @return seconds. Minvalue="0", maxvalue="59".
     */    
    public Integer getSeconds() {
        return (Integer) store.get( KEY_SECONDS );
    }
    /**
     * Set the second. Minvalue="0", maxvalue="59".
     * @param seconds min: 0 max: 59
     */    
    public void setSeconds( Integer seconds ) {
        if (seconds != null) {
            store.put(KEY_SECONDS, seconds );
        } else {
        	store.remove(KEY_SECONDS);
        }
    }
}