E
- the type of activities being groupedpublic class GroupGenerator<E>
extends java.lang.Object
activity
comparator
iteratively groups works that are below the threshold as
activity groups
.Constructor | Description |
---|---|
GroupGenerator(ActivityComparator<E> comparator) |
Creates a new activity group generator, provided a comparator that will
determine whether activities match.
|
Modifier and Type | Method | Description |
---|---|---|
java.util.List<ActivityGroup<E>> |
getGroups() |
The activity groups generated so far.
|
void |
group(E act) |
Adds an activity with the already existing groups.
|
public GroupGenerator(ActivityComparator<E> comparator)
comparator
- the activity comparatorpublic void group(E act)
act
- the activity to be added to the groupspublic java.util.List<ActivityGroup<E>> getGroups()