Class TrafficLocation

  • java.lang.Object
    • com.here.sdk.traffic.TrafficLocation

  • public final class TrafficLocation
    extends java.lang.Object

    The location reference to the traffic incident.

    • Constructor Summary

      Constructors 
      Constructor Description
      TrafficLocation​(GeoPolyline polyline, java.util.List<GeoPolyline> additionalPolylines, int lengthInMeters)
      Creates a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      int hashCode()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • description

        @NonNull
        public java.lang.String description

        The description of the location. In general, the language can't be bound to the description. Usually, the language is one of the local languages of the incident region. Note: A localizable description of the incident is part of TrafficIncidentBase.getDescription(). This description describes only the location where the incident occurred. Defaults to an empty string.

      • polyline

        @NonNull
        public GeoPolyline polyline

        The polyline representing the traffic entity shape. The current field contains a continuous polyline with no gaps between geo-coordinates. All others following the gap are present in the additional_polylines field.

      • additionalPolylines

        @NonNull
        public java.util.List<GeoPolyline> additionalPolylines

        List of polylines that were not included in continuous polyline. Use this to fill any gaps in the continuous polyline.

      • lengthInMeters

        public int lengthInMeters

        The affected road length in meters. The length can be 0 only if the incident supplier has provided incomplete data.

    • Constructor Detail

      • TrafficLocation

        public TrafficLocation​(@NonNull
                               GeoPolyline polyline,
                               @NonNull
                               java.util.List<GeoPolyline> additionalPolylines,
                               int lengthInMeters)

        Creates a new instance.

        Parameters:
        polyline -

        The polyline representing the traffic entity shape. The current field contains a continuous polyline with no gaps between geo-coordinates. All others following the gap are present in the additional_polylines field.

        additionalPolylines -

        List of polylines that were not included in continuous polyline. Use this to fill any gaps in the continuous polyline.

        lengthInMeters -

        The affected road length in meters. The length can be 0 only if the incident supplier has provided incomplete data.

    • Method Detail

      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object