Uses of Class
com.google.protobuf.Duration
Packages that use Duration
-
Uses of Duration in com.google.protobuf
Fields in com.google.protobuf declared as DurationFields in com.google.protobuf with type parameters of type DurationMethods in com.google.protobuf that return DurationModifier and TypeMethodDescriptionstatic Duration
Duration.getDefaultInstance()
static Duration
Duration.parseDelimitedFrom
(InputStream input) static Duration
Duration.parseDelimitedFrom
(InputStream input, ExtensionRegistryLite extensionRegistry) static Duration
Duration.parseFrom
(byte[] data) static Duration
Duration.parseFrom
(byte[] data, ExtensionRegistryLite extensionRegistry) static Duration
Duration.parseFrom
(ByteString data) static Duration
Duration.parseFrom
(ByteString data, ExtensionRegistryLite extensionRegistry) static Duration
Duration.parseFrom
(CodedInputStream input) static Duration
Duration.parseFrom
(CodedInputStream input, ExtensionRegistryLite extensionRegistry) static Duration
Duration.parseFrom
(InputStream input) static Duration
Duration.parseFrom
(InputStream input, ExtensionRegistryLite extensionRegistry) static Duration
Duration.parseFrom
(ByteBuffer data) static Duration
Duration.parseFrom
(ByteBuffer data, ExtensionRegistryLite extensionRegistry) Methods in com.google.protobuf that return types with arguments of type DurationMethods in com.google.protobuf with parameters of type DurationModifier and TypeMethodDescriptionstatic Duration.Builder
Duration.newBuilder
(Duration prototype) -
Uses of Duration in com.google.protobuf.util
Fields in com.google.protobuf.util declared as DurationModifier and TypeFieldDescriptionstatic final Duration
Durations.MAX_VALUE
A constant holding the maximum validDuration
, approximately+10,000
years.static final Duration
Durations.MIN_VALUE
A constant holding the minimum validDuration
, approximately-10,000
years.static final Duration
Durations.ZERO
A constant holding the duration of zero.Methods in com.google.protobuf.util that return DurationModifier and TypeMethodDescriptionstatic Duration
Deprecated.Do not use this method for new code.static Duration
Deprecated.Do not use this method for new code.static Duration
Durations.checkNotNegative
(Duration duration) Ensures that the givenDuration
is not negative.static Duration
Durations.checkPositive
(Duration duration) Ensures that the givenDuration
is positive.static Duration
Durations.checkValid
(Duration duration) Throws anIllegalArgumentException
if the givenDuration
is not valid.static Duration
Durations.checkValid
(Duration.Builder durationBuilder) Builds the given builder and throws anIllegalArgumentException
if it is not valid.static Duration
Durations.fromDays
(long days) Create a Duration from the number of days.static Duration
Durations.fromHours
(long hours) Create a Duration from the number of hours.static Duration
Durations.fromMicros
(long microseconds) Create a Duration from the number of microseconds.static Duration
Durations.fromMillis
(long milliseconds) Create a Duration from the number of milliseconds.static Duration
Durations.fromMinutes
(long minutes) Create a Duration from the number of minutes.static Duration
Durations.fromNanos
(long nanoseconds) Create a Duration from the number of nanoseconds.static Duration
Durations.fromSeconds
(long seconds) Create a Duration from the number of seconds.(package private) static Duration
Durations.normalizedDuration
(long seconds, int nanos) static Duration
Parse a string to produce a duration.static Duration
Durations.parseUnchecked
(String value) Parses a string in RFC 3339 format into aDuration
.static Duration
Deprecated.Do not use this method for new code.Methods in com.google.protobuf.util that return types with arguments of type DurationModifier and TypeMethodDescriptionstatic Comparator
<Duration> Durations.comparator()
Returns aComparator
forDuration
s which sorts in increasing chronological order.Methods in com.google.protobuf.util with parameters of type DurationModifier and TypeMethodDescriptionstatic Duration
Deprecated.Do not use this method for new code.static Timestamp
Deprecated.Do not use this method for new code.static Duration
Durations.checkNotNegative
(Duration duration) Ensures that the givenDuration
is not negative.static Duration
Durations.checkPositive
(Duration duration) Ensures that the givenDuration
is positive.static Duration
Durations.checkValid
(Duration duration) Throws anIllegalArgumentException
if the givenDuration
is not valid.static int
Compares two durations.int
static boolean
Durations.isNegative
(Duration duration) Returns whether the givenDuration
is negative or not.static boolean
Durations.isPositive
(Duration duration) Returns whether the givenDuration
is positive or not.static boolean
Returns true if the givenDuration
is valid.static Duration
Deprecated.Do not use this method for new code.static Timestamp
Deprecated.Do not use this method for new code.static long
Convert a Duration to the number of days.static long
Convert a Duration to the number of hours.static long
Convert a Duration to the number of microseconds.static long
Convert a Duration to the number of milliseconds.static long
Convert a Duration to the number of minutes.static long
Convert a Duration to the number of nanoseconds.static long
Convert a Duration to the number of seconds.static double
Durations.toSecondsAsDouble
(Duration duration) Returns the number of seconds of the given duration as adouble
.static String
Convert Duration to string format.