blob: b7f4a08a6f0b45e2d66f56fa8a0f291063770442 (
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
|
package com.smartdevicelink.proxy.rpc;
import android.support.annotation.NonNull;
import com.smartdevicelink.protocol.enums.FunctionID;
import com.smartdevicelink.proxy.RPCResponse;
import com.smartdevicelink.proxy.rpc.enums.Result;
import java.util.Hashtable;
/**
* Slider Response is sent, when Slider has been called
*
* @since SmartDeviceLink 2.0
*/
public class SliderResponse extends RPCResponse {
public static final String KEY_SLIDER_POSITION = "sliderPosition";
/**
* Constructs a new SliderResponse object
*/
public SliderResponse() {
super(FunctionID.SLIDER.toString());
}
/**
* Constructs a new SliderResponse object indicated by the Hashtable
* parameter
* <p></p>
*
* @param hash
* The Hashtable to use
*/
public SliderResponse(Hashtable<String, Object> hash) {
super(hash);
}
/**
* Constructs a new SliderResponse object
* @param success whether the request is successfully processed
* @param resultCode whether the request is successfully processed
*/
public SliderResponse(@NonNull Boolean success, @NonNull Result resultCode) {
this();
setSuccess(success);
setResultCode(resultCode);
}
/**
* Sets an Initial position of slider control
* @param sliderPosition
*/
public void setSliderPosition(Integer sliderPosition) {
setParameters(KEY_SLIDER_POSITION, sliderPosition);
}
/**
* Gets an Initial position of slider control
* @return Integer
*/
public Integer getSliderPosition() {
return getInteger(KEY_SLIDER_POSITION);
}
}
|