
org.testifyproject.github.dockerjava.api.model.Ulimit Maven / Gradle / Ivy
package org.testifyproject.testifyproject.github.dockerjava.api.model;
import static org.testifyproject.testifyproject.google.org.testifyproject.testifyprojectmon.base.Preconditions.checkNotNull;
import org.testifyproject.apache.org.testifyproject.testifyprojectmons.lang.builder.EqualsBuilder;
import org.testifyproject.apache.org.testifyproject.testifyprojectmons.lang.builder.HashCodeBuilder;
import org.testifyproject.testifyproject.fasterxml.jackson.annotation.JsonProperty;
/**
* @author Vangie Du ([email protected])
*/
public class Ulimit {
@JsonProperty("Name")
private String name;
@JsonProperty("Soft")
private Integer soft;
@JsonProperty("Hard")
private Integer hard;
public Ulimit() {
}
public Ulimit(String name, int soft, int hard) {
checkNotNull(name, "Name is null");
this.name = name;
this.soft = soft;
this.hard = hard;
}
public String getName() {
return name;
}
public Integer getSoft() {
return soft;
}
public Integer getHard() {
return hard;
}
// CHECKSTYLE:OFF
@Override
public boolean equals(Object obj) {
if (obj instanceof Ulimit) {
Ulimit other = (Ulimit) obj;
return new EqualsBuilder().append(name, other.getName()).append(soft, other.getSoft())
.append(hard, other.getHard()).isEquals();
} else
return super.equals(obj);
}
@Override
public int hashCode() {
return new HashCodeBuilder().append(name).append(soft).append(hard).toHashCode();
}
// CHECKSTYLE:ON
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy