
org.everit.json.schema.event.ConditionalSchemaValidationEvent Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of org.everit.json.schema Show documentation
Show all versions of org.everit.json.schema Show documentation
This is a fork of the implementation of the JSON Schema Core Draft v4 specification built with the org.json API which also supports internationalization
The newest version!
package org.everit.json.schema.event;
import java.util.Objects;
import org.everit.json.schema.ConditionalSchema;
public abstract class ConditionalSchemaValidationEvent extends ValidationEvent {
public enum Keyword {
IF {
@Override public String toString() {
return "if";
}
},
THEN {
@Override public String toString() {
return "then";
}
},
ELSE {
@Override public String toString() {
return "else";
}
};
}
final ConditionalSchemaMatchEvent.Keyword keyword;
public ConditionalSchemaValidationEvent(ConditionalSchema schema, Object instance, Keyword keyword) {
super(schema, instance);
this.keyword = keyword;
}
public Keyword getKeyword() {
return keyword;
}
@Override public boolean equals(Object o) {
if (this == o)
return true;
if (!(o instanceof ConditionalSchemaValidationEvent))
return false;
if (!super.equals(o))
return false;
ConditionalSchemaValidationEvent that = (ConditionalSchemaValidationEvent) o;
return keyword == that.keyword;
}
@Override public int hashCode() {
return Objects.hash(super.hashCode(), keyword);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy