com.fitbur.github.dockerjava.api.model.Ulimit Maven / Gradle / Ivy
package com.fitbur.github.dockerjava.api.model;
import static com.fitbur.google.com.fitburmon.base.Preconditions.checkNotNull;
import com.fitbur.apache.com.fitburmons.lang.builder.EqualsBuilder;
import com.fitbur.apache.com.fitburmons.lang.builder.HashCodeBuilder;
import com.fitbur.fasterxml.jackson.annotation.JsonProperty;
/**
* @author Vangie Du ([email protected])
*/
public class Ulimit {
@JsonProperty("Name")
private String name;
@JsonProperty("Soft")
private int soft;
@JsonProperty("Hard")
private int 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 int getSoft() {
return soft;
}
public int getHard() {
return hard;
}
@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();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy