Interface Algorithm<T extends ClusterItem>
-
- All Known Subinterfaces:
ScreenBasedAlgorithm<T>
- All Known Implementing Classes:
AbstractAlgorithm,GridBasedAlgorithm,NonHierarchicalDistanceBasedAlgorithm,NonHierarchicalViewBasedAlgorithm,PreCachingAlgorithmDecorator,ScreenBasedAlgorithmAdapter
public interface Algorithm<T extends ClusterItem>Logic for computing clusters
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanaddItem(T item)Adds an item to the algorithmbooleanaddItems(java.util.Collection<T> items)Adds a collection of items to the algorithmvoidclearItems()java.util.Set<? extends Cluster<T>>getClusters(float zoom)java.util.Collection<T>getItems()intgetMaxDistanceBetweenClusteredItems()voidlock()booleanremoveItem(T item)Removes an item from the algorithmbooleanremoveItems(java.util.Collection<T> items)Removes a collection of items from the algorithmvoidsetMaxDistanceBetweenClusteredItems(int maxDistance)voidunlock()booleanupdateItem(T item)Updates the provided item in the algorithm
-
-
-
Method Detail
-
addItem
boolean addItem(T item)
Adds an item to the algorithm- Parameters:
item- the item to be added- Returns:
- true if the algorithm contents changed as a result of the call
-
addItems
boolean addItems(java.util.Collection<T> items)
Adds a collection of items to the algorithm- Parameters:
items- the items to be added- Returns:
- true if the algorithm contents changed as a result of the call
-
clearItems
void clearItems()
-
removeItem
boolean removeItem(T item)
Removes an item from the algorithm- Parameters:
item- the item to be removed- Returns:
- true if this algorithm contained the specified element (or equivalently, if this algorithm changed as a result of the call).
-
updateItem
boolean updateItem(T item)
Updates the provided item in the algorithm- Parameters:
item- the item to be updated- Returns:
- true if the item existed in the algorithm and was updated, or false if the item did not exist in the algorithm and the algorithm contents remain unchanged.
-
removeItems
boolean removeItems(java.util.Collection<T> items)
Removes a collection of items from the algorithm- Parameters:
items- the items to be removed- Returns:
- true if this algorithm contents changed as a result of the call
-
getItems
java.util.Collection<T> getItems()
-
setMaxDistanceBetweenClusteredItems
void setMaxDistanceBetweenClusteredItems(int maxDistance)
-
getMaxDistanceBetweenClusteredItems
int getMaxDistanceBetweenClusteredItems()
-
lock
void lock()
-
unlock
void unlock()
-
-