Uses of Class
com.google.protobuf.Duration
Packages that use Duration
-
Uses of Duration in com.google.protobuf
Methods in com.google.protobuf that return DurationModifier and TypeMethodDescriptionDuration.Builder.build()
Duration.Builder.buildPartial()
static Duration
Duration.getDefaultInstance()
Duration.Builder.getDefaultInstanceForType()
Duration.getDefaultInstanceForType()
static Duration
Duration.parseDelimitedFrom
(InputStream input) static Duration
Duration.parseDelimitedFrom
(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static Duration
Duration.parseFrom
(byte[] data) static Duration
Duration.parseFrom
(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static Duration
Duration.parseFrom
(com.google.protobuf.ByteString data) static Duration
Duration.parseFrom
(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static Duration
Duration.parseFrom
(com.google.protobuf.CodedInputStream input) static Duration
Duration.parseFrom
(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static Duration
Duration.parseFrom
(InputStream input) static Duration
Duration.parseFrom
(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static Duration
Duration.parseFrom
(ByteBuffer data) static Duration
Duration.parseFrom
(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) Methods in com.google.protobuf that return types with arguments of type DurationModifier and TypeMethodDescriptioncom.google.protobuf.Parser
<Duration> Duration.getParserForType()
static com.google.protobuf.Parser
<Duration> Duration.parser()
Methods 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
Add two durations.static Duration
Calculate the difference between two timestamps.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.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
Subtract a duration from another.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
Add two durations.static Timestamp
Add a duration to a timestamp.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.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
Subtract a duration from another.static Timestamp
Subtract a duration from a timestamp.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.