com.nulabinc.backlog4j.internal.json.PriorityJSONImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of backlog4j Show documentation
Show all versions of backlog4j Show documentation
Backlog4j is a Backlog binding library for Java.
package com.nulabinc.backlog4j.internal.json;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.nulabinc.backlog4j.Issue;
import com.nulabinc.backlog4j.Priority;
import com.nulabinc.backlog4j.User;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
/**
* @author nulab-inc
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class PriorityJSONImpl implements Priority {
private int id;
private String name;
@Override
public long getId() {
return this.id;
}
@Override
public String getIdAsString() {
return String.valueOf(this.id);
}
@Override
public String getName() {
return this.name;
}
@Override
public Issue.PriorityType getPriorityType() {
return Issue.PriorityType.valueOf(this.id);
}
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (obj == this) {
return true;
}
if (obj.getClass() != getClass()) {
return false;
}
PriorityJSONImpl rhs = (PriorityJSONImpl) obj;
return new EqualsBuilder()
.append(this.id, rhs.id)
.append(this.name, rhs.name)
.isEquals();
}
@Override
public int hashCode() {
return new HashCodeBuilder()
.append(id)
.append(name)
.toHashCode();
}
@Override
public String toString() {
return new ToStringBuilder(this)
.append("id", id)
.append("name", name)
.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy