package org.texttechnologylab.project.gruppe_05_1.domain.nlp;

import java.util.Objects;
import java.util.StringJoiner;

public class Dependency {
    String      type;
    String      governor;
    String      dependent;

    public Dependency() {
    }

    public Dependency(String type, String governor, String dependent) {
        this.type = type;
        this.governor = governor;
        this.dependent = dependent;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getGovernor() {
        return governor;
    }

    public void setGovernor(String governor) {
        this.governor = governor;
    }

    public String getDependent() {
        return dependent;
    }

    public void setDependent(String dependent) {
        this.dependent = dependent;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof Dependency that)) return false;
        return Objects.equals(type, that.type) && Objects.equals(governor, that.governor) && Objects.equals(dependent, that.dependent);
    }

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

    @Override
    public String toString() {
        return new StringJoiner(", ", Dependency.class.getSimpleName() + "[", "]")
                .add("type='" + type + "'")
                .add("governor='" + governor + "'")
                .add("dependent='" + dependent + "'")
                .toString();
    }
}
