Class Duration


  • public class Duration
    extends Object
    The structure is pretty close of the Timestamp one. For clarity, a second type of message is used.
    • Constructor Detail

      • Duration

        public Duration()
        No args constructor for use in serialization
      • Duration

        public Duration​(Long seconds,
                        Long nanos)
        Parameters:
        seconds -
        nanos -
    • Method Detail

      • getSeconds

        public Long getSeconds()
        (Required)
      • setSeconds

        public void setSeconds​(Long seconds)
        (Required)
      • getNanos

        public Long getNanos()
        Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive. (Required)
      • setNanos

        public void setNanos​(Long nanos)
        Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive. (Required)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object