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

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

public class Sentence {
    // int         begin;      // TODO: momentan nicht in MongoDB
    // int         end;        // TODO: momentan nicht in MongoDB
    String text;

    public Sentence() {
    }

    public Sentence(String text) {
        this.text = text;
    }

    public String getText() {
        return text;
    }

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

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof Sentence sentence)) return false;
        return Objects.equals(text, sentence.text);
    }

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

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