import CompareBase from "../Database/CompareBase";
import BadDataException from "../Exception/BadDataException";
import { ObjectType } from "../JSON";
export default class NotEqual extends CompareBase {
    constructor(value) {
        super(value);
    }
    toString() {
        return this.value.toString();
    }
    toJSON() {
        return {
            _type: ObjectType.NotEqual,
            value: this.toString(),
        };
    }
    static fromJSON(json) {
        if (json["_type"] === ObjectType.NotEqual) {
            return new NotEqual(json["value"]);
        }
        throw new BadDataException("Invalid JSON: " + JSON.stringify(json));
    }
}
//# sourceMappingURL=NotEqual.js.map