Package com.yandex.mapkit.map
Interface BaseMapObjectCollection
All Superinterfaces:
All known Subinterfaces:
ClusterizedPlacemarkCollection, MapObjectCollection
interface BaseMapObjectCollection extends MapObject
Summary
Methods
Type and modifiers |
Method and Description |
void |
traverse(@NonNull MapObjectVisitor mapObjectVisitor) |
void |
remove(@NonNull MapObject mapObject) |
void |
clear() |
void |
addListener(@NonNull MapObjectCollectionListener collectionListener) |
void |
removeListener(@NonNull MapObjectCollectionListener collectionListener) |
Methods
traverse
void traverse(@NonNull MapObjectVisitor mapObjectVisitor) |
Traverses through the collection with a visitor object.
Used for iteration over map objects in the collection.
The class does not retain the object in the 'mapObjectVisitor' parameter. It is your responsibility to maintain a strong reference to the target object while it is attached to a class.
remove
void remove(@NonNull MapObject mapObject) |
Removes the given map object from the collection.
clear
void clear() |
Removes all map objects from the collection.
addListener
void addListener(@NonNull MapObjectCollectionListener collectionListener) |
Adds a listener to track notifications of changes to the collection.
The class does not retain the object in the 'collectionListener' parameter. It is your responsibility to maintain a strong reference to the target object while it is attached to a class.
removeListener
void removeListener(@NonNull MapObjectCollectionListener collectionListener) |
Removes a listener.