我有一个自定义object
列表,如下:
public List<Message> getMessages() {
return messages;
}
并且:
public class Message {
@SerializedName("id")
@Expose
private String id;
@SerializedName("useridfrom")
@Expose
private String useridfrom;
@SerializedName("useridto")
@Expose
private String useridto;
@SerializedName("subject")
@Expose
private String subject;
@SerializedName("fullmessage")
@Expose
private String fullmessage;
@SerializedName("fullmessageformat")
@Expose
private String fullmessageformat;
@SerializedName("fullmessagehtml")
@Expose
private String fullmessagehtml;
@SerializedName("smallmessage")
@Expose
private String smallmessage;
@SerializedName("notification")
@Expose
private String notification;
@SerializedName("contexturl")
@Expose
private Object contexturl;
@SerializedName("contexturlname")
@Expose
private Object contexturlname;
@SerializedName("timecreated")
@Expose
private String timecreated;
@SerializedName("timeuserfromdeleted")
@Expose
private String timeuserfromdeleted;
@SerializedName("timeusertodeleted")
@Expose
private String timeusertodeleted;
@SerializedName("component")
@Expose
private String component;
@SerializedName("eventtype")
@Expose
private String eventtype;
@SerializedName("userfromfirstnamephonetic")
@Expose
private String userfromfirstnamephonetic;
@SerializedName("userfromlastnamephonetic")
@Expose
private String userfromlastnamephonetic;
@SerializedName("userfrommiddlename")
@Expose
private String userfrommiddlename;
@SerializedName("userfromalternatename")
@Expose
private String userfromalternatename;
@SerializedName("userfromfirstname")
@Expose
private String userfromfirstname;
@SerializedName("userfromlastname")
@Expose
private String userfromlastname;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getUseridfrom() {
return useridfrom;
}
public void setUseridfrom(String useridfrom) {
this.useridfrom = useridfrom;
}
public String getUseridto() {
return useridto;
}
public void setUseridto(String useridto) {
this.useridto = useridto;
}
public String getSubject() {
return subject;
}
public void setSubject(String subject) {
this.subject = subject;
}
public String getFullmessage() {
return fullmessage;
}
public void setFullmessage(String fullmessage) {
this.fullmessage = fullmessage;
}
public String getFullmessageformat() {
return fullmessageformat;
}
public void setFullmessageformat(String fullmessageformat) {
this.fullmessageformat = fullmessageformat;
}
public String getFullmessagehtml() {
return fullmessagehtml;
}
public void setFullmessagehtml(String fullmessagehtml) {
this.fullmessagehtml = fullmessagehtml;
}
public String getSmallmessage() {
return smallmessage;
}
public void setSmallmessage(String smallmessage) {
this.smallmessage = smallmessage;
}
public String getNotification() {
return notification;
}
public void setNotification(String notification) {
this.notification = notification;
}
public Object getContexturl() {
return contexturl;
}
public void setContexturl(Object contexturl) {
this.contexturl = contexturl;
}
public Object getContexturlname() {
return contexturlname;
}
public void setContexturlname(Object contexturlname) {
this.contexturlname = contexturlname;
}
public String getTimecreated() {
return timecreated;
}
public void setTimecreated(String timecreated) {
this.timecreated = timecreated;
}
public String getTimeuserfromdeleted() {
return timeuserfromdeleted;
}
public void setTimeuserfromdeleted(String timeuserfromdeleted) {
this.timeuserfromdeleted = timeuserfromdeleted;
}
public String getTimeusertodeleted() {
return timeusertodeleted;
}
public void setTimeusertodeleted(String timeusertodeleted) {
this.timeusertodeleted = timeusertodeleted;
}
public String getComponent() {
return component;
}
public void setComponent(String component) {
this.component = component;
}
public String getEventtype() {
return eventtype;
}
public void setEventtype(String eventtype) {
this.eventtype = eventtype;
}
public String getUserfromfirstnamephonetic() {
return userfromfirstnamephonetic;
}
public void setUserfromfirstnamephonetic(String userfromfirstnamephonetic) {
this.userfromfirstnamephonetic = userfromfirstnamephonetic;
}
public String getUserfromlastnamephonetic() {
return userfromlastnamephonetic;
}
public void setUserfromlastnamephonetic(String userfromlastnamephonetic) {
this.userfromlastnamephonetic = userfromlastnamephonetic;
}
public String getUserfrommiddlename() {
return userfrommiddlename;
}
public void setUserfrommiddlename(String userfrommiddlename) {
this.userfrommiddlename = userfrommiddlename;
}
public String getUserfromalternatename() {
return userfromalternatename;
}
public void setUserfromalternatename(String userfromalternatename) {
this.userfromalternatename = userfromalternatename;
}
public String getUserfromfirstname() {
return userfromfirstname;
}
public void setUserfromfirstname(String userfromfirstname) {
this.userfromfirstname = userfromfirstname;
}
public String getUserfromlastname() {
return userfromlastname;
}
public void setUserfromlastname(String userfromlastname) {
this.userfromlastname = userfromlastname;
}
}
如何计算重复的项目:useridfrom
和useridto
。
我喜欢在RXJava中使用,以获得更好的后台效果。