public class GridBasedAlgorithm<T extends ClusterItem> extends AbstractAlgorithm<T>
Constructor and Description |
---|
GridBasedAlgorithm() |
Modifier and Type | Method and Description |
---|---|
boolean |
addItem(T item)
Adds an item to the algorithm
|
boolean |
addItems(java.util.Collection<T> items)
Adds a collection of items to the algorithm
|
void |
clearItems() |
java.util.Set<? extends Cluster<T>> |
getClusters(float zoom) |
java.util.Collection<T> |
getItems() |
int |
getMaxDistanceBetweenClusteredItems() |
boolean |
removeItem(T item)
Removes an item from the algorithm
|
boolean |
removeItems(java.util.Collection<T> items)
Removes a collection of items from the algorithm
|
void |
setMaxDistanceBetweenClusteredItems(int maxDistance) |
boolean |
updateItem(T item)
Updates the provided item in the algorithm
|
lock, unlock
public boolean addItem(T item)
item
- the item to be addedpublic boolean addItems(java.util.Collection<T> items)
items
- the items to be addedpublic void clearItems()
public boolean removeItem(T item)
item
- the item to be removedpublic boolean removeItems(java.util.Collection<T> items)
items
- the items to be removedpublic boolean updateItem(T item)
item
- the item to be updatedpublic void setMaxDistanceBetweenClusteredItems(int maxDistance)
public int getMaxDistanceBetweenClusteredItems()
public java.util.Collection<T> getItems()