ru.r2cloud.apt.model.ValidationError Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of apt-man Show documentation
Show all versions of apt-man Show documentation
Library for managing APT repository
The newest version!
package ru.r2cloud.apt.model;
public class ValidationError {
private ValidationErrorCode code;
private String message;
public ValidationError() {
// do nothing
}
public ValidationError(ValidationErrorCode code, String message) {
this.code = code;
this.message = message;
}
public ValidationErrorCode getCode() {
return code;
}
public void setCode(ValidationErrorCode code) {
this.code = code;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((code == null) ? 0 : code.hashCode());
result = prime * result + ((message == null) ? 0 : message.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
ValidationError other = (ValidationError) obj;
if (code != other.code)
return false;
if (message == null) {
if (other.message != null)
return false;
} else if (!message.equals(other.message))
return false;
return true;
}
}