package lc.mecha.lang;

import java.util.Objects;

public class TypedObject {
    private final String type;

    public TypedObject(String type) {
        this.type = type;
    }

    public String getType() {
        return type;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TypedObject that = (TypedObject) o;
        return Objects.equals(type, that.type);
    }

    @Override
    public int hashCode() {
        return Objects.hash(type);
    }

    @Override
    public String toString() {
        return "TypedObject{" +
                "type='" + type + '\'' +
                '}';
    }
}
