-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStudentGroupQuery.java
More file actions
31 lines (26 loc) · 1.28 KB
/
StudentGroupQuery.java
File metadata and controls
31 lines (26 loc) · 1.28 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
28
29
30
31
package info.kgeorgiy.java.advanced.student;
import java.util.Collection;
import java.util.List;
/**
* Hard-version interface
* for <a href="https://www.kgeorgiy.info/courses/java-advanced/homeworks.html#homework-student">Student</a> homework
* of <a href="https://www.kgeorgiy.info/courses/java-advanced/">Java Advanced</a> course.
*
* @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);
}