Class Distance

  • All Implemented Interfaces:
    java.io.Serializable

    public class Distance
    extends java.lang.Object
    implements java.io.Serializable
    The distance component for Directions API results.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.lang.String humanReadable
      The human-friendly distance.
      long inMeters
      The numeric distance, in meters.
    • Constructor Summary

      Constructors 
      Constructor Description
      Distance()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • inMeters

        public long inMeters
        The numeric distance, in meters. This is intended to be used only in algorithmic situations, e.g. sorting results by some user specified metric.
      • humanReadable

        public java.lang.String humanReadable
        The human-friendly distance. This is rounded and in an appropriate unit for the request. The units can be overridden with a request parameter.
    • Constructor Detail

      • Distance

        public Distance()
    • Method Detail

      • toString

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