All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ru.r2cloud.apt.model.ValidationError Maven / Gradle / Ivy

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;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy