Class SpeedLimit

java.lang.Object
ai.nextbillion.maps.model.SpeedLimit
All Implemented Interfaces:
java.io.Serializable

public class SpeedLimit
extends java.lang.Object
implements java.io.Serializable
A speed limit result from the Roads API.
See Also:
Serialized Form
  • Field Summary

    Fields 
    Modifier and Type Field Description
    java.lang.String placeId
    A unique identifier for a place.
    double speedLimit
    The speed limit for that road segment, specified in kilometers per hour.
  • Constructor Summary

    Constructors 
    Constructor Description
    SpeedLimit()  
  • Method Summary

    Modifier and Type Method Description
    long speedLimitMph()  
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • placeId

      public java.lang.String placeId
      A unique identifier for a place. All placeIds returned by the Roads API will correspond to road segments.
    • speedLimit

      public double speedLimit
      The speed limit for that road segment, specified in kilometers per hour.

      To obtain the speed in miles per hour, use speedLimitMph().

  • Constructor Details

  • Method Details

    • speedLimitMph

      public long speedLimitMph()
      Returns:
      Returns the speed limit in miles per hour (MPH).
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object