devutility.internal.test.data.model.Student Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of devutility.internal Show documentation
Show all versions of devutility.internal Show documentation
Some utilities for Java development
package devutility.internal.test.data.model;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class Student extends Person {
private String number;
private LocalDateTime entryTime;
private String onlyGet;
public String getNumber() {
return number;
}
public void setNumber(String number) {
this.number = number;
}
public LocalDateTime getEntryTime() {
return entryTime;
}
public void setEntryTime(LocalDateTime entryTime) {
this.entryTime = entryTime;
}
public String getOnlyGet() {
return onlyGet;
}
public static List students(int count) {
List list = new ArrayList<>(count);
for (int i = 0; i < count; i++) {
int number = i + 1;
Student student = new Student();
student.setAge(20);
student.setBirthday(new Date());
student.setLocal(true);
student.setName(String.format("Name_%d", number));
student.setNumber(String.valueOf(number));
list.add(student);
}
return list;
}
}