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

org.everit.json.schema.event.CombinedSchemaValidationEvent Maven / Gradle / Ivy

Go to download

Implementation of the JSON Schema Core Draft v4 specification built with the org.json API

There is a newer version: 1.14.4
Show newest version
package org.everit.json.schema.event;

import java.util.Objects;

import org.everit.json.schema.CombinedSchema;
import org.everit.json.schema.Schema;

public abstract class CombinedSchemaValidationEvent extends ValidationEvent {

    final Schema subSchema;

    public CombinedSchemaValidationEvent(CombinedSchema schema, Schema subSchema, Object instance) {
        super(schema, instance);
        this.subSchema = subSchema;
    }

    @Override public boolean equals(Object o) {
        if (this == o)
            return true;
        if (!(o instanceof CombinedSchemaValidationEvent))
            return false;
        if (!super.equals(o))
            return false;
        CombinedSchemaValidationEvent that = (CombinedSchemaValidationEvent) o;
        return subSchema.equals(that.subSchema);
    }

    @Override public int hashCode() {
        return Objects.hash(super.hashCode(), subSchema);
    }

    public Schema getSubSchema() {
        return subSchema;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy