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

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

public class Parlamentarier {
    String id;
    String vorname;
    String nachname;
    String partei;

    public String getId() {
        return id;
    }

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

    public String getVorname() {
        return vorname;
    }

    public void setVorname(String vorname) {
        this.vorname = vorname;
    }

    public String getNachname() {
        return nachname;
    }

    public void setNachname(String nachname) {
        this.nachname = nachname;
    }

    public String getPartei() {
        return partei;
    }

    public void setPartei(String partei) {
        this.partei = partei;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof Parlamentarier that)) return false;
        return Objects.equals(id, that.id) && Objects.equals(vorname, that.vorname) && Objects.equals(nachname, that.nachname) && Objects.equals(partei, that.partei);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, vorname, nachname, partei);
    }

    @Override
    public String toString() {
        return new StringJoiner(", ", Parlamentarier.class.getSimpleName() + "[", "]")
                .add("id='" + id + "'")
                .add("vorname='" + vorname + "'")
                .add("nachname='" + nachname + "'")
                .add("partei='" + partei + "'")
                .toString();
    }
}
