/* * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template */ package com.test.beans; /** * * @author steve.maingana */ public class User { private String pseudo; private String motDePasse; public User(String pseudo, String motDePasse) { this.pseudo = pseudo; this.motDePasse = motDePasse; } public String getPseudo() { return this.pseudo; } private String getMDP() { return this.motDePasse; } public void setPseudo(String pseudo) { this.pseudo = pseudo; } public void setMDP(String MDP) { this.motDePasse = MDP; } @Override public boolean equals(Object user) { boolean resultat = false; if (user.getClass().equals(this.getClass())) { User toCompare = (User) user; if (this.getPseudo().equals(toCompare.getPseudo()) && this.getMDP().equals(toCompare.getMDP())) { resultat = true; } } return resultat; }; }