Uses of Class
com.google.protobuf.Duration
-
Packages that use Duration Package Description com.google.protobuf com.google.protobuf.util -
-
Uses of Duration in com.google.protobuf
Methods in com.google.protobuf that return Duration Modifier and Type Method Description DurationDuration.Builder. build()DurationDuration.Builder. buildPartial()static DurationDuration. getDefaultInstance()DurationDuration.Builder. getDefaultInstanceForType()DurationDuration. getDefaultInstanceForType()static DurationDuration. parseDelimitedFrom(java.io.InputStream input)static DurationDuration. parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static DurationDuration. parseFrom(byte[] data)static DurationDuration. parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static DurationDuration. parseFrom(com.google.protobuf.ByteString data)static DurationDuration. parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static DurationDuration. parseFrom(com.google.protobuf.CodedInputStream input)static DurationDuration. parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static DurationDuration. parseFrom(java.io.InputStream input)static DurationDuration. parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static DurationDuration. parseFrom(java.nio.ByteBuffer data)static DurationDuration. parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)Methods in com.google.protobuf that return types with arguments of type Duration Modifier and Type Method Description com.google.protobuf.Parser<Duration>Duration. getParserForType()static com.google.protobuf.Parser<Duration>Duration. parser()Methods in com.google.protobuf with parameters of type Duration Modifier and Type Method Description Duration.BuilderDuration.Builder. mergeFrom(Duration other)static Duration.BuilderDuration. newBuilder(Duration prototype) -
Uses of Duration in com.google.protobuf.util
Fields in com.google.protobuf.util declared as Duration Modifier and Type Field Description static DurationDurations. MAX_VALUEA constant holding the maximum validDuration, approximately+10,000years.static DurationDurations. MIN_VALUEA constant holding the minimum validDuration, approximately-10,000years.static DurationDurations. ZEROA constant holding the duration of zero.Methods in com.google.protobuf.util that return Duration Modifier and Type Method Description static DurationDurations. add(Duration d1, Duration d2)Add two durations.static DurationTimestamps. between(Timestamp from, Timestamp to)Calculate the difference between two timestamps.static DurationDurations. checkNotNegative(Duration duration)Ensures that the givenDurationis not negative.static DurationDurations. checkPositive(Duration duration)Ensures that the givenDurationis positive.static DurationDurations. checkValid(Duration duration)Throws anIllegalArgumentExceptionif the givenDurationis not valid.static DurationDurations. checkValid(Duration.Builder durationBuilder)Builds the given builder and throws anIllegalArgumentExceptionif it is not valid.static DurationDurations. fromDays(long days)Create a Duration from the number of days.static DurationDurations. fromHours(long hours)Create a Duration from the number of hours.static DurationDurations. fromMicros(long microseconds)Create a Duration from the number of microseconds.static DurationDurations. fromMillis(long milliseconds)Create a Duration from the number of milliseconds.static DurationDurations. fromMinutes(long minutes)Create a Duration from the number of minutes.static DurationDurations. fromNanos(long nanoseconds)Create a Duration from the number of nanoseconds.static DurationDurations. fromSeconds(long seconds)Create a Duration from the number of seconds.static DurationDurations. parse(java.lang.String value)Parse a string to produce a duration.static DurationDurations. parseUnchecked(java.lang.String value)Parses a string in RFC 3339 format into aDuration.static DurationDurations. subtract(Duration d1, Duration d2)Subtract a duration from another.Methods in com.google.protobuf.util that return types with arguments of type Duration Modifier and Type Method Description static java.util.Comparator<Duration>Durations. comparator()Returns aComparatorforDurations which sorts in increasing chronological order.Methods in com.google.protobuf.util with parameters of type Duration Modifier and Type Method Description static DurationDurations. add(Duration d1, Duration d2)Add two durations.static TimestampTimestamps. add(Timestamp start, Duration length)Add a duration to a timestamp.static DurationDurations. checkNotNegative(Duration duration)Ensures that the givenDurationis not negative.static DurationDurations. checkPositive(Duration duration)Ensures that the givenDurationis positive.static DurationDurations. checkValid(Duration duration)Throws anIllegalArgumentExceptionif the givenDurationis not valid.static intDurations. compare(Duration x, Duration y)Compares two durations.static booleanDurations. isNegative(Duration duration)Returns whether the givenDurationis negative or not.static booleanDurations. isPositive(Duration duration)Returns whether the givenDurationis positive or not.static booleanDurations. isValid(Duration duration)Returns true if the givenDurationis valid.static DurationDurations. subtract(Duration d1, Duration d2)Subtract a duration from another.static TimestampTimestamps. subtract(Timestamp start, Duration length)Subtract a duration from a timestamp.static longDurations. toDays(Duration duration)Convert a Duration to the number of days.static longDurations. toHours(Duration duration)Convert a Duration to the number of hours.static longDurations. toMicros(Duration duration)Convert a Duration to the number of microseconds.static longDurations. toMillis(Duration duration)Convert a Duration to the number of milliseconds.static longDurations. toMinutes(Duration duration)Convert a Duration to the number of minutes.static longDurations. toNanos(Duration duration)Convert a Duration to the number of nanoseconds.static longDurations. toSeconds(Duration duration)Convert a Duration to the number of seconds.static doubleDurations. toSecondsAsDouble(Duration duration)Returns the number of seconds of the given duration as adouble.static java.lang.StringDurations. toString(Duration duration)Convert Duration to string format.
-