Class ZoneImpl

    • Field Detail

      • id

        protected final long id
        Unique identifier for the zone
      • externalId

        protected String externalId
        External Id for this zone
      • xmlId

        protected String xmlId
        xml Id for this zone
      • inputProperties

        protected Map<String,​Object> inputProperties
        generic input property storage
      • centroid

        protected final Centroid centroid
        Centroid of the zone
      • geometry

        protected org.locationtech.jts.geom.Polygon geometry
        geometry of this zone
    • Constructor Detail

      • ZoneImpl

        public ZoneImpl​(IdGroupingToken tokenId)
        Constructor
        Parameters:
        tokenId - contiguous id generation within this group for instances of this class
    • Method Detail

      • generateZoneId

        protected static long generateZoneId​(IdGroupingToken groupId)
        Generate unique id for this zone
        Parameters:
        groupId - contiguous id generation within this group for instances of this class
        Returns:
        id for this zone
      • getId

        public long getId()
        Returns the id of this zone
        Specified by:
        getId in interface Idable
        Returns:
        id of this zone
      • addInputProperty

        public void addInputProperty​(String key,
                                     Object value)
        Add a property from the original input that is not part of the readily available members
        Parameters:
        key - property key
        value - property value
      • getInputProperty

        public Object getInputProperty​(String key)
        Get input property by its key
        Parameters:
        key - property key
        Returns:
        property value
      • getCentroid

        public Centroid getCentroid()
        Returns the centroid of this zone
        Specified by:
        getCentroid in interface Zone
        Returns:
        centroid of this zone
      • setExternalId

        public void setExternalId​(String externalId)
        set the external id
        Specified by:
        setExternalId in interface ExternalIdable
        Parameters:
        externalId - to set
      • getXmlId

        public String getXmlId()
        the id exposed to users as the "normal" id in the PLANit native xml format
        Specified by:
        getXmlId in interface ExternalIdable
        Returns:
        xmlId
      • setXmlId

        public void setXmlId​(String xmlId)
        set the external id
        Specified by:
        setXmlId in interface ExternalIdable
        Parameters:
        xmlId - to set
      • setGeometry

        public void setGeometry​(org.locationtech.jts.geom.Polygon geometry)
        set the geometry (outer border) of this zone
        Specified by:
        setGeometry in interface Zone
        Parameters:
        geometry - of the zone
      • getGeometry

        public org.locationtech.jts.geom.Polygon getGeometry()
        Collect the geometry (outer border) of this zone
        Specified by:
        getGeometry in interface Zone
        Returns:
        geometry of the zone