package de.dhbwstuttgart.strucTypes4.typeVars;


import de.dhbwstuttgart.strucTypes4.syntaxtree.Class;

/**
 * Created by sebastian on 14.04.17.
 */
public class TypeVarType extends TypeVarAbstract {


    private Class typeClass;


    public TypeVarType(Class typeClass) {
        this.typeClass = typeClass;
    }


    public Class getTypeClass() {
        return typeClass;
    }

    public void setTypeClass(Class typeClass) {
        this.typeClass = typeClass;
    }


    @Override
    public String toString() {
        return String.format("TVarType: %s ", typeClass.getName() );
    }




    @Override
    public boolean equals(Object obj) {
        if (obj.getClass().equals(TypeVarType.class)) {
            TypeVarType tv = (TypeVarType) obj;
            if (tv.toString().equals(this.toString())) {
                return true;
            }
        }
        return false;
    }
}
