com.regnosys.rosetta.translate.MappingError Maven / Gradle / Ivy
package com.regnosys.rosetta.translate;
public class MappingError {
public enum MappingErrorLevel {
ERROR, WARNING;
}
private final MappingErrorLevel level;
private final String message;
public MappingError(MappingErrorLevel level, String message) {
this.level = level;
this.message = message;
}
public MappingErrorLevel getLevel() {
return level;
}
public String getMessage() {
return message;
}
@Override
public String toString() {
return "MappingError [level=" + level + ", message=" + message + "]";
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((level == null) ? 0 : level.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;
MappingError other = (MappingError) obj;
if (level != other.level)
return false;
if (message == null) {
if (other.message != null)
return false;
} else if (!message.equals(other.message))
return false;
return true;
}
}