Device.java

 1package im.conversations.android.xmpp.model.axolotl;
 2
 3import com.google.common.base.Strings;
 4import com.google.common.primitives.Ints;
 5import im.conversations.android.annotation.XmlElement;
 6import im.conversations.android.xmpp.model.Extension;
 7
 8@XmlElement
 9public class Device extends Extension {
10
11    public Device() {
12        super(Device.class);
13    }
14
15    public Integer getDeviceId() {
16        return Ints.tryParse(Strings.nullToEmpty(this.getAttribute("id")));
17    }
18
19    public void setDeviceId(int deviceId) {
20        this.setAttribute("id", deviceId);
21    }
22}