You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
790 B

import java.io.Serializable;
public class Credential implements Serializable {
private String name, password;
private final int id;
public Credential(String name, String password, int id) throws Exception {
if(name == null || password == null)
throw new Exception("kein leeres Objekt erstellen");
this.name = name;
this.password = password;
this.id = id;
}
public String getName()
{
return this.name;
}
public String getPassword() { return this.password; }
public int getId() { return this.id; }
public void upDatePassword(String newPassword)
{
this.password = newPassword;
}
public void updateUsername(String newUsername)
{
this.name = newUsername;
}
}