-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStudentGroupQuery.java
More file actions
27 lines (22 loc) · 1.04 KB
/
Copy pathStudentGroupQuery.java
File metadata and controls
27 lines (22 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package info.kgeorgiy.java.advanced.student;
import java.util.Collection;
import java.util.List;
/**
* @author Georgiy Korneev (kgeorgiy@kgeorgiy.info)
*/
public interface StudentGroupQuery extends StudentQuery {
/** Returns student groups, where both groups and students within a group are ordered by name. */
List<Group> getGroupsByName(Collection<Student> students);
/** Returns student groups, where groups are ordered by name, and students within a group are ordered by id. */
List<Group> getGroupsById(Collection<Student> students);
/**
* Returns name of the group containing maximum number of students.
* If there are more than one largest group, the one with smallest name is returned.
*/
String getLargestGroup(Collection<Student> students);
/**
* Returns name of the group containing maximum number of students with distinct first names.
* If there are more than one largest group, the one with smallest name is returned.
*/
String getLargestGroupFirstName(Collection<Student> students);
}