package com.casic.detector.cluster;

import com.amap.api.maps.model.LatLng;
import com.amap.api.maps.model.Marker;

import java.util.ArrayList;
import java.util.List;

public class Cluster {
    private final LatLng latLng;
    private final List<ClusterItem> clusterItems;
    private Marker marker;


    public Cluster(LatLng latLng) {
        this.latLng = latLng;
        clusterItems = new ArrayList<>();
    }

    public void addClusterItem(ClusterItem clusterItem) {
        clusterItems.add(clusterItem);
    }

    public int getClusterCount() {
        return clusterItems.size();
    }

    public LatLng getCenterLatLng() {
        return latLng;
    }

    public void setMarker(Marker marker) {
        this.marker = marker;
    }

    public Marker getMarker() {
        return marker;
    }

    public List<ClusterItem> getClusterItems() {
        return clusterItems;
    }
}
