This commit is contained in:
62
src/java/com/test/beans/User.java
Normal file
62
src/java/com/test/beans/User.java
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.test.beans;
|
||||
|
||||
import java.util.Objects;
|
||||
/**
|
||||
*
|
||||
* @author thomas.millot
|
||||
*/
|
||||
public class User {
|
||||
private String pseudo;
|
||||
private String mdp;
|
||||
|
||||
public User(String pseudo, String mdp){
|
||||
this.pseudo = pseudo;
|
||||
this.mdp = mdp;
|
||||
}
|
||||
|
||||
public String getPseudo(){
|
||||
return pseudo;
|
||||
}
|
||||
|
||||
public String getMdp(){
|
||||
return mdp;
|
||||
}
|
||||
|
||||
public void setMdp(){
|
||||
this.mdp = mdp;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 7;
|
||||
hash = 31 * hash + Objects.hashCode(this.pseudo);
|
||||
hash = 31 * hash + Objects.hashCode(this.mdp);
|
||||
return hash;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final User other = (User) obj;
|
||||
if (!Objects.equals(this.pseudo, other.pseudo)) {
|
||||
return false;
|
||||
}
|
||||
if (!Objects.equals(this.mdp, other.mdp)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user