package example.util; import java.util.ArrayList; import java.util.List; public class Student { private String name; public Student(String name){ this.name = name; } public static List generateList(int first, int pageSize){ List students = new ArrayList(); for (int i = 0; i < pageSize; i++){ students.add(new Student("Student " + (i+first))); } return students; } /* GETTERS AND SETTERS */ public String getName() {return name;} public void setName(String name) {this.name = name;} public boolean equals(Object o) { if (o == null) return false; if (!(o instanceof Student)) return false; if (((Student) o).name == null && this.name != null) return false; if (((Student) o).name != null && this.name == null) return false; if (((Student) o).name == null && this.name == null) return true; return this.name.equals(((Student) o).name); } public int hashCode() { if (this.name == null) return 0; return this.name.hashCode(); } }