diff options
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/src/main/java/org/openecomp/core/validation/ErrorMessageCode.java')
-rw-r--r-- | openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/src/main/java/org/openecomp/core/validation/ErrorMessageCode.java | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/src/main/java/org/openecomp/core/validation/ErrorMessageCode.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/src/main/java/org/openecomp/core/validation/ErrorMessageCode.java new file mode 100644 index 0000000000..a958d27740 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-api/src/main/java/org/openecomp/core/validation/ErrorMessageCode.java @@ -0,0 +1,36 @@ +package org.openecomp.core.validation; + +import java.util.Objects; + +public final class ErrorMessageCode { + private final String messageCode; + + public ErrorMessageCode(String messageCode) { + + this.messageCode = messageCode; + } + + public String getMessageCode() { + return messageCode; + } + + @Override + public String toString() { + return messageCode; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + + ErrorMessageCode that = (ErrorMessageCode) o; + + return Objects.equals(this.messageCode, that.messageCode); + } + + @Override + public int hashCode() { + return Objects.hashCode(this.messageCode); + } +} |