public class ScreenBasedAlgorithmAdapter<T extends ClusterItem> extends AbstractAlgorithm<T> implements ScreenBasedAlgorithm<T>
| Constructor and Description |
|---|
ScreenBasedAlgorithmAdapter(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() |
void |
onCameraChange(CameraPosition cameraPosition) |
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 |
shouldReclusterOnMapMovement() |
boolean |
updateItem(T item)
Updates the provided item in the algorithm
|
lock, unlockpublic boolean shouldReclusterOnMapMovement()
shouldReclusterOnMapMovement in interface ScreenBasedAlgorithm<T extends ClusterItem>public boolean addItem(T item)
AlgorithmaddItem in interface Algorithm<T extends ClusterItem>item - the item to be addedpublic boolean addItems(java.util.Collection<T> items)
AlgorithmaddItems in interface Algorithm<T extends ClusterItem>items - the items to be addedpublic void clearItems()
clearItems in interface Algorithm<T extends ClusterItem>public boolean removeItem(T item)
AlgorithmremoveItem in interface Algorithm<T extends ClusterItem>item - the item to be removedpublic boolean removeItems(java.util.Collection<T> items)
AlgorithmremoveItems in interface Algorithm<T extends ClusterItem>items - the items to be removedpublic boolean updateItem(T item)
AlgorithmupdateItem in interface Algorithm<T extends ClusterItem>item - the item to be updatedpublic java.util.Set<? extends Cluster<T>> getClusters(float zoom)
getClusters in interface Algorithm<T extends ClusterItem>public java.util.Collection<T> getItems()
getItems in interface Algorithm<T extends ClusterItem>public void setMaxDistanceBetweenClusteredItems(int maxDistance)
setMaxDistanceBetweenClusteredItems in interface Algorithm<T extends ClusterItem>public int getMaxDistanceBetweenClusteredItems()
getMaxDistanceBetweenClusteredItems in interface Algorithm<T extends ClusterItem>public void onCameraChange(CameraPosition cameraPosition)
onCameraChange in interface ScreenBasedAlgorithm<T extends ClusterItem>