Class Duration

  • All Implemented Interfaces:
    java.io.Serializable

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

      Fields 
      Modifier and Type Field Description
      java.lang.String humanReadable
      The human-friendly duration.
      long inSeconds
      The numeric duration, in seconds.
    • Constructor Summary

      Constructors 
      Constructor Description
      Duration()  
    • 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

      • inSeconds

        public long inSeconds
        The numeric duration, in seconds. 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 duration. Use this for display purposes.
    • Constructor Detail

      • Duration

        public Duration()
    • Method Detail

      • toString

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