package at.oefai.aaa.agent.jam;

import java.util.EventObject;

/**
 * reports a change in the worldmodel.
 * @author Stefan Rank
 */
public class WorldModelTableEvent extends EventObject {
    public static enum Type { RETRACT, ASSERT }

    private final Type type;
    private final WorldModelRelation relation;

    public WorldModelTableEvent(final Object source, final Type pType, final WorldModelRelation rel) {
        super(source);
        assert rel != null : "non-null relation needed";
        this.type = pType;
        this.relation = rel;
    }

    public final Type getType() {
        return this.type;
    }

    public final WorldModelRelation getRelation() {
        return this.relation;
    }
}
