Package | Description |
---|---|
com.google.protobuf | |
com.google.protobuf.util |
Modifier and Type | Field and Description |
---|---|
private static Timestamp |
Timestamp.DEFAULT_INSTANCE |
Modifier and Type | Field and Description |
---|---|
private static Parser<Timestamp> |
Timestamp.PARSER |
Modifier and Type | Method and Description |
---|---|
Timestamp |
Timestamp.Builder.build() |
Timestamp |
Timestamp.Builder.buildPartial() |
static Timestamp |
Timestamp.getDefaultInstance() |
Timestamp |
Timestamp.getDefaultInstanceForType() |
Timestamp |
Timestamp.Builder.getDefaultInstanceForType() |
static Timestamp |
Timestamp.parseDelimitedFrom(java.io.InputStream input) |
static Timestamp |
Timestamp.parseDelimitedFrom(java.io.InputStream input,
ExtensionRegistryLite extensionRegistry) |
static Timestamp |
Timestamp.parseFrom(byte[] data) |
static Timestamp |
Timestamp.parseFrom(byte[] data,
ExtensionRegistryLite extensionRegistry) |
static Timestamp |
Timestamp.parseFrom(java.nio.ByteBuffer data) |
static Timestamp |
Timestamp.parseFrom(java.nio.ByteBuffer data,
ExtensionRegistryLite extensionRegistry) |
static Timestamp |
Timestamp.parseFrom(ByteString data) |
static Timestamp |
Timestamp.parseFrom(ByteString data,
ExtensionRegistryLite extensionRegistry) |
static Timestamp |
Timestamp.parseFrom(CodedInputStream input) |
static Timestamp |
Timestamp.parseFrom(CodedInputStream input,
ExtensionRegistryLite extensionRegistry) |
static Timestamp |
Timestamp.parseFrom(java.io.InputStream input) |
static Timestamp |
Timestamp.parseFrom(java.io.InputStream input,
ExtensionRegistryLite extensionRegistry) |
Modifier and Type | Method and Description |
---|---|
Parser<Timestamp> |
Timestamp.getParserForType() |
static Parser<Timestamp> |
Timestamp.parser() |
Modifier and Type | Method and Description |
---|---|
Timestamp.Builder |
Timestamp.Builder.mergeFrom(Timestamp other) |
static Timestamp.Builder |
Timestamp.newBuilder(Timestamp prototype) |
Modifier and Type | Field and Description |
---|---|
static Timestamp |
Timestamps.EPOCH
A constant holding the
Timestamp of epoch time, 1970-01-01T00:00:00.000000000Z . |
static Timestamp |
Timestamps.MAX_VALUE
A constant holding the maximum valid
Timestamp , 9999-12-31T23:59:59.999999999Z . |
static Timestamp |
Timestamps.MIN_VALUE
A constant holding the minimum valid
Timestamp , 0001-01-01T00:00:00Z . |
Modifier and Type | Field and Description |
---|---|
private static java.util.Comparator<Timestamp> |
Timestamps.COMPARATOR |
Modifier and Type | Method and Description |
---|---|
static Timestamp |
Timestamps.add(Timestamp start,
Duration length)
Add a duration to a timestamp.
|
static Timestamp |
TimeUtil.add(Timestamp start,
Duration length)
Deprecated.
|
static Timestamp |
Timestamps.checkValid(Timestamp timestamp)
Throws an
IllegalArgumentException if the given Timestamp is not valid. |
static Timestamp |
TimeUtil.createTimestampFromMicros(long microseconds)
Deprecated.
Use
Timestamps.fromMicros(long) instead. |
static Timestamp |
TimeUtil.createTimestampFromMillis(long milliseconds)
Deprecated.
Use
Timestamps.fromMillis(long) instead. |
static Timestamp |
TimeUtil.createTimestampFromNanos(long nanoseconds)
Deprecated.
Use
Timestamps.fromNanos(long) instead. |
static Timestamp |
Timestamps.fromMicros(long microseconds)
Create a Timestamp from the number of microseconds elapsed from the epoch.
|
static Timestamp |
Timestamps.fromMillis(long milliseconds)
Create a Timestamp from the number of milliseconds elapsed from the epoch.
|
static Timestamp |
Timestamps.fromNanos(long nanoseconds)
Create a Timestamp from the number of nanoseconds elapsed from the epoch.
|
static Timestamp |
Timestamps.fromSeconds(long seconds)
Create a Timestamp from the number of seconds elapsed from the epoch.
|
static Timestamp |
TimeUtil.getCurrentTime()
Deprecated.
Use
Timestamps.fromMillis(System.currentTimeMillis()) instead. |
static Timestamp |
TimeUtil.getEpoch()
Deprecated.
Use
Timestamps.fromMillis(0) instead. |
(package private) static Timestamp |
Timestamps.normalizedTimestamp(long seconds,
int nanos) |
static Timestamp |
Timestamps.parse(java.lang.String value)
Parse from RFC 3339 date string to Timestamp.
|
static Timestamp |
TimeUtil.parseTimestamp(java.lang.String value)
Deprecated.
Use
Timestamps.parse(java.lang.String) instead. |
static Timestamp |
Timestamps.subtract(Timestamp start,
Duration length)
Subtract a duration from a timestamp.
|
static Timestamp |
TimeUtil.subtract(Timestamp start,
Duration length)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static java.util.Comparator<Timestamp> |
Timestamps.comparator()
Returns a
Comparator for Timestamp s which sorts in increasing chronological
order. |
Modifier and Type | Method and Description |
---|---|
static Timestamp |
Timestamps.add(Timestamp start,
Duration length)
Add a duration to a timestamp.
|
static Timestamp |
TimeUtil.add(Timestamp start,
Duration length)
Deprecated.
|
static Duration |
Timestamps.between(Timestamp from,
Timestamp to)
Calculate the difference between two timestamps.
|
static Timestamp |
Timestamps.checkValid(Timestamp timestamp)
Throws an
IllegalArgumentException if the given Timestamp is not valid. |
static int |
Timestamps.compare(Timestamp x,
Timestamp y)
Compares two timestamps.
|
static Duration |
TimeUtil.distance(Timestamp from,
Timestamp to)
Deprecated.
|
static boolean |
Timestamps.isValid(Timestamp timestamp)
Returns true if the given
Timestamp is valid. |
static Timestamp |
Timestamps.subtract(Timestamp start,
Duration length)
Subtract a duration from a timestamp.
|
static Timestamp |
TimeUtil.subtract(Timestamp start,
Duration length)
Deprecated.
|
static long |
Timestamps.toMicros(Timestamp timestamp)
Convert a Timestamp to the number of microseconds elapsed from the epoch.
|
static long |
TimeUtil.toMicros(Timestamp timestamp)
Deprecated.
Use
Timestamps.toMicros(com.google.protobuf.Timestamp) instead. |
static long |
Timestamps.toMillis(Timestamp timestamp)
Convert a Timestamp to the number of milliseconds elapsed from the epoch.
|
static long |
TimeUtil.toMillis(Timestamp timestamp)
Deprecated.
Use
Timestamps.toMillis(com.google.protobuf.Timestamp) instead. |
static long |
Timestamps.toNanos(Timestamp timestamp)
Convert a Timestamp to the number of nanoseconds elapsed from the epoch.
|
static long |
TimeUtil.toNanos(Timestamp timestamp)
Deprecated.
Use
Timestamps.toNanos(com.google.protobuf.Timestamp) instead. |
static long |
Timestamps.toSeconds(Timestamp timestamp)
Convert a Timestamp to the number of seconds elapsed from the epoch.
|
static java.lang.String |
Timestamps.toString(Timestamp timestamp)
Convert Timestamp to RFC 3339 date string format.
|
static java.lang.String |
TimeUtil.toString(Timestamp timestamp)
Deprecated.
Use
Timestamps.toString(com.google.protobuf.Timestamp) instead. |