package cactusServer.entities; public class Account { private String id,name, pass, token; private boolean login = false; public Account(String userID,String userName, String userPass) { setId(userID); setName(userName); setPass(userPass); } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getPass() { return pass; } public void setPass(String pass) { this.pass = pass; } public boolean isLogin() { return login; } public void setLogin(boolean login) { this.login = login; } public String getToken() { return token; } public String formToken() { token = RandomStringGenerator.createRandomString(64, RandomStringGenerator.ALPHA_NUMERIC); return token; } public Account getAccount(String token) { if (this.token == token) { return this; } else { return null; } } }