""" BuildingsCluster module SPDX - License - Identifier: LGPL - 3.0 - or -later Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca """ from city_model_structure.city_objects_cluster import CityObjectsCluster from typing import List, TypeVar CityObject = TypeVar('CityObject') class BuildingsCluster(CityObjectsCluster): """ BuildingsCluster(CityObjectsCluster) class """ def __init__(self, name, city_objects): self._cluster_type = 'buildings' super().__init__(name, self._cluster_type, city_objects) self._name = name self._city_objects = city_objects @property def type(self): """ Cluster type :return: str """ return self._cluster_type @property def city_objects(self) -> List[CityObject]: """ List of city objects conforming the cluster :return: [CityObject] """ return self._city_objects