Package com.android.identity
Class Timestamp
- java.lang.Object
-
- com.android.identity.Timestamp
-
public final class Timestamp extends java.lang.ObjectRepresents a single instant in time. Ideally, we'd usejava.time.Instant, but we cannot do so until we move to API level 26.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object other)inthashCode()static Timestampnow()static TimestampofEpochMilli(long epochMillis)longtoEpochMilli()java.lang.StringtoString()
-
-
-
Method Detail
-
now
@NonNull public static Timestamp now()
- Returns:
- a
Timestamprepresenting the current time
-
ofEpochMilli
@NonNull public static Timestamp ofEpochMilli(long epochMillis)
- Parameters:
epochMillis- A time represented as the number of milliseconds since midnight, January 1, 1970 UTC- Returns:
- a
Timestamprepresenting the given time
-
toEpochMilli
public long toEpochMilli()
- Returns:
- this represented as the number of milliseconds since midnight, January 1, 1970 UTC
-
toString
@NonNull public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-