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 Duration
Duration.Builder. build()
Duration
Duration.Builder. buildPartial()
static Duration
Duration. getDefaultInstance()
Duration
Duration.Builder. getDefaultInstanceForType()
Duration
Duration. getDefaultInstanceForType()
static Duration
Duration. parseDelimitedFrom(java.io.InputStream input)
static Duration
Duration. parseDelimitedFrom(java.io.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(java.io.InputStream input)
static Duration
Duration. parseFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry)
static Duration
Duration. parseFrom(java.nio.ByteBuffer data)
static Duration
Duration. parseFrom(java.nio.ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Methods in com.google.protobuf that return types with arguments of type Duration Modifier and Type Method Description Parser<Duration>
Duration. getParserForType()
static Parser<Duration>
Duration. parser()
Methods in com.google.protobuf with parameters of type Duration Modifier and Type Method Description Duration.Builder
Duration.Builder. mergeFrom(Duration other)
static Duration.Builder
Duration. 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 Duration
Durations. MAX_VALUE
A constant holding the maximum validDuration
, approximately+10,000
years.static Duration
Durations. MIN_VALUE
A constant holding the minimum validDuration
, approximately-10,000
years.static Duration
Durations. ZERO
A constant holding the duration of zero.Methods in com.google.protobuf.util that return Duration Modifier and Type Method Description static Duration
Durations. add(Duration d1, Duration d2)
Add two durations.static Duration
Timestamps. between(Timestamp from, Timestamp to)
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
Durations. parse(java.lang.String value)
Parse a string to produce a duration.static Duration
Durations. parseUnchecked(java.lang.String value)
Parses a string in RFC 3339 format into aDuration
.static Duration
Durations. 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 aComparator
forDuration
s which sorts in increasing chronological order.Methods in com.google.protobuf.util with parameters of type Duration Modifier and Type Method Description static Duration
Durations. add(Duration d1, Duration d2)
Add two durations.static Timestamp
Timestamps. add(Timestamp start, Duration length)
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
Durations. compare(Duration x, Duration y)
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
Durations. isValid(Duration duration)
Returns true if the givenDuration
is valid.static Duration
Durations. subtract(Duration d1, Duration d2)
Subtract a duration from another.static Timestamp
Timestamps. subtract(Timestamp start, Duration length)
Subtract a duration from a timestamp.static long
Durations. toDays(Duration duration)
Convert a Duration to the number of days.static long
Durations. toHours(Duration duration)
Convert a Duration to the number of hours.static long
Durations. toMicros(Duration duration)
Convert a Duration to the number of microseconds.static long
Durations. toMillis(Duration duration)
Convert a Duration to the number of milliseconds.static long
Durations. toMinutes(Duration duration)
Convert a Duration to the number of minutes.static long
Durations. toNanos(Duration duration)
Convert a Duration to the number of nanoseconds.static long
Durations. toSeconds(Duration duration)
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 java.lang.String
Durations. toString(Duration duration)
Convert Duration to string format.
-