package de.uni_hamburg.fs;

class RetypeItem extends ToDoItem {
    Type _type;

    RetypeItem(Node node, Type type) {
        super(node);
        this._type = type;
    }

    @Override
    void doIt(EquivRelation er) throws UnificationFailure {
        _node = er.getUnificator(_node);
        er.retypeOne(_node, _type);
    }

    @Override
    public String toString() {
        return "Refining node of type " + _node.getType() + "("
            + _node.getType().getClass().getName() + ") with type " + _type + "("
            + _type.getClass().getName() + ").";
    }
}
