A
- the type of the activitiespublic final class Cluster<A extends Activity> extends Object
Resolver.resolve(List, Predicate)
Constructor and Description |
---|
Cluster() |
Modifier and Type | Method and Description |
---|---|
void |
add(A activity)
Adds an activity to the cluster.
|
List<A> |
getActivities()
Returns all activities within the cluster.
|
int |
getColumnCount()
Returns the number of columns that are needed by the cluster in order to
display all activities without any overlaps.
|
List<Column<A>> |
getColumns()
Returns the list of columns.
|
boolean |
intersects(A activity)
Determines if the given activity intersects with the current time bounds
of the cluster.
|
Map<A,Placement<A>> |
resolve(Predicate<A> filter)
Resolves the conflicts within this cluster by placing the activites in
different columns.
|
public int getColumnCount()
resolve(Predicate)
method has been called.public void add(A activity)
activity
- the activitypublic List<A> getActivities()
public boolean intersects(A activity)
activity
- the activity to checkpublic Map<A,Placement<A>> resolve(Predicate<A> filter)
filter
- a filter used to ignore some of the activitiespublic List<Column<A>> getColumns()
resolve(Predicate)
has been called.Copyright © 2020 Dirk Lemmermann Software & Consulting. All rights reserved.