com.codeslap.apps.bean.User Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of codeslap-api Show documentation
Show all versions of codeslap-api Show documentation
Java library to use the apps.codeslap.com API
package com.codeslap.apps.bean;
import org.simpleframework.xml.Default;
import org.simpleframework.xml.DefaultType;
import org.simpleframework.xml.Element;
import org.simpleframework.xml.Root;
/**
* @author cristian
*/
@Root(name = "user")
@Default(DefaultType.FIELD)
public class User {
@Element(name = "id", required = true)
private String id;
@Element(name = "email", required = true)
private String email;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
User user = (User) o;
if (email != null ? !email.equals(user.email) : user.email != null) return false;
if (id != null ? !id.equals(user.id) : user.id != null) return false;
return true;
}
@Override
public int hashCode() {
int result = id != null ? id.hashCode() : 0;
result = 31 * result + (email != null ? email.hashCode() : 0);
return result;
}
@Override
public String toString() {
return "User{" +
"id='" + id + '\'' +
", email='" + email + '\'' +
'}';
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy