5段階目(Mainでポリモーフィズムを使おう)
This commit is contained in:
@@ -35,19 +35,6 @@ public class EmployeeData extends BaseData {
|
||||
+ "\t" + this.password + "\t" + this.idDepartment;
|
||||
}
|
||||
|
||||
public boolean isMatchId(String id) {
|
||||
return getIdEmployee().equals(id);
|
||||
}
|
||||
|
||||
public static boolean isMatchId(EmployeeData[] employees, String id) {
|
||||
for (EmployeeData e : employees) {
|
||||
if (e.isMatchId(id))
|
||||
return true;
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public String getIdEmployee() {
|
||||
return idEmployee;
|
||||
}
|
||||
@@ -122,5 +109,4 @@ public class EmployeeData extends BaseData {
|
||||
public String getPrimaryKeyValue() {
|
||||
return this.idEmployee;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user