at.gridgears.held.FindLocationError Maven / Gradle / Ivy
package at.gridgears.held;
import org.apache.commons.lang3.Validate;
import org.apache.commons.lang3.builder.ToStringBuilder;
import java.io.Serializable;
import java.util.Objects;
public class FindLocationError implements Serializable {
private static final long serialVersionUID = 1L;
private final String code;
private final String message;
public FindLocationError(String code, String message) {
Validate.notEmpty(code, "code must not be null or empty");
Validate.notEmpty(message, "message must not be null or empty");
this.code = code;
this.message = message;
}
public String getCode() {
return code;
}
public String getMessage() {
return message;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
FindLocationError that = (FindLocationError) o;
return Objects.equals(code, that.code) &&
Objects.equals(message, that.message);
}
@Override
public int hashCode() {
return Objects.hash(code, message);
}
@Override
public String toString() {
return new ToStringBuilder(this)
.append("code", code)
.append("message", message)
.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy