Class PolylineBarrier

    • Constructor Detail

      • PolylineBarrier

        public PolylineBarrier​(Polyline polyline)
        Creates an instance of PolylineBarrier with provided geometry.
        Parameters:
        polyline - defining the shape and location of the barrier
        Throws:
        IllegalArgumentException - if polyline is null
        Since:
        100.0.0
    • Method Detail

      • setType

        public void setType​(BarrierType type)
        Sets the type of the barrier, whether it fully restricts travel across it, or merely increases the cost of travel.
        Parameters:
        type - type
        Since:
        100.0.0
      • getScaleFactorForCost

        public double getScaleFactorForCost​(String attributeName)
        Gets the scale factor for cost.
        Parameters:
        attributeName - attribute name. It can be empty. Null is treated as an empty string.
        Returns:
        the scale factor for cost. Returns 1 if it was not set.
        Since:
        100.0.0
      • setScaleFactorForCost

        public void setScaleFactorForCost​(String attributeName,
                                          double addedCost)
        Sets the scale factor for cost.
        Parameters:
        attributeName - attribute name. It can be empty. Null is treated as an empty string.
        addedCost - added cost
        Since:
        100.0.0
      • getGeometry

        public Polyline getGeometry()
        Gets the shape and location of the barrier.
        Returns:
        the geometry
        Since:
        100.0.0
      • getName

        public String getName()
        Gets the name of the barrier.
        Returns:
        the name of the barrier
        Since:
        100.3.0
      • setName

        public void setName​(String name)
        Sets the name of the barrier.
        Parameters:
        name - the name of the barrier
        Since:
        100.3.0