public class PreCachingAlgorithmDecorator<T extends ClusterItem> extends AbstractAlgorithm<T>
Constructor and Description |
---|
PreCachingAlgorithmDecorator(Algorithm<T> algorithm) |
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)
Algorithm
item
- the item to be addedpublic boolean addItems(java.util.Collection<T> items)
Algorithm
items
- the items to be addedpublic void clearItems()
public boolean removeItem(T item)
Algorithm
item
- the item to be removedpublic boolean removeItems(java.util.Collection<T> items)
Algorithm
items
- the items to be removedpublic boolean updateItem(T item)
Algorithm
item
- the item to be updatedpublic java.util.Collection<T> getItems()
public void setMaxDistanceBetweenClusteredItems(int maxDistance)
public int getMaxDistanceBetweenClusteredItems()