package com.smartdevicelink.proxy.rpc;
import java.util.Hashtable;
import com.smartdevicelink.proxy.RPCStruct;
import com.smartdevicelink.proxy.rpc.enums.ComponentVolumeStatus;
/**
* Tire pressure status of a single tire.
*
Parameter List
*
*
* Name |
* Type |
* Description |
* SmartDeviceLink Ver. Available |
*
*
* status |
* ComponentVolumeStatus |
* Describes the volume status of a single tire
* See {@linkplain ComponentVolumeStatus}
* |
* SmartDeviceLink 2.0 |
*
*
* @since SmartDeviceLink 2.0
*/
public class SingleTireStatus extends RPCStruct {
public static final String KEY_STATUS = "status";
/**
* Constructs a newly allocated SingleTireStatus object
*/
public SingleTireStatus() { }
/**
* Constructs a newly allocated SingleTireStatus object indicated by the Hashtable parameter
* @param hash The Hashtable to use
*/
public SingleTireStatus(Hashtable hash) {
super(hash);
}
/**
* set the volume status of a single tire
* @param status the volume status of a single tire
*/
public void setStatus(ComponentVolumeStatus status) {
if (status != null) {
store.put(KEY_STATUS, status);
} else {
store.remove(KEY_STATUS);
}
}
/**
* get the volume status of a single tire
* @return the volume status of a single tire
*/
public ComponentVolumeStatus getStatus() {
Object obj = store.get(KEY_STATUS);
if (obj instanceof ComponentVolumeStatus) {
return (ComponentVolumeStatus) obj;
} else if (obj instanceof String) {
return ComponentVolumeStatus.valueForString((String) obj);
}
return null;
}
}