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

import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.StringJoiner;

public abstract class Comment {

    String      id;
    String      text;
    String      speaker;
    String      speech;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public String getSpeaker() {
        return speaker;
    }

    public void setSpeaker(String speaker) {
        this.speaker = speaker;
    }

    public String getSpeech() {
        return speech;
    }

    public void setSpeech(String speech) {
        this.speech = speech;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof Comment comment)) return false;
        return Objects.equals(id, comment.id) && Objects.equals(text, comment.text) && Objects.equals(speaker, comment.speaker) && Objects.equals(speech, comment.speech);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, text, speaker, speech);
    }

    @Override
    public String toString() {
        return new StringJoiner(", ", Comment.class.getSimpleName() + "[", "]")
                .add("id='" + id + "'")
                .add("text='" + text + "'")
                .add("speaker='" + speaker + "'")
                .add("speech='" + speech + "'")
                .toString();
    }
}
