package de.dhbwstuttgart.strucTypes5.constraints;

import de.dhbwstuttgart.strucTypes5.algo.Type;
import de.dhbwstuttgart.strucTypes5.typeVars.TypeVar;

/**
 * Created by sebastian on 20.04.17.
 */
public class ConstraintField extends  ConstraintAbstract{

    private TypeVar receiver;
    private String nameOfField;
    private TypeVar returnType;


    public ConstraintField(TypeVar receiver, String nameOfField, TypeVar returnType) {
        this.receiver = receiver;
        this.nameOfField = nameOfField;
        this.returnType = returnType;
    }


    public TypeVar getReceiver() {
        return receiver;
    }

    public void setReceiver(TypeVar receiver) {
        this.receiver = receiver;
    }

    public String getNameOfField() {
        return nameOfField;
    }

    public void setNameOfField(String nameOfField) {
        this.nameOfField = nameOfField;
    }

    public TypeVar getReturnType() {
        return returnType;
    }

    public void setReturnType(TypeVar returnType) {
        this.returnType = returnType;
    }

    @Override
    public String toString() {
        return String.format("ConstraintField( %s , %s , %s ) " , receiver, nameOfField, returnType);
    }
}

