Interface Timestamped
- All Known Implementing Classes:
Choice, Connect, End, Error, Join, Message, Report, Session.Event, Session.Report, Session.Result, Start, Stop, Timestamped.Adapter, Update
public interface Timestamped
A timestamped object records the moment it was created.
- Author:
- Stephen G. Ware
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classAn implementation of theTimestampedinterface. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DateTimeFormatterThe format used for printing timestamps as text -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the time this object was created as the number of milliseconds from the epoch (1970-01-01T00:00:00Z) in Coordinated Universal Time (UTC).static StringtoString(long time) Formats an instant in time as concise, human-readable text.static StringFormats an instant in time as concise, human-readable text.
-
Field Details
-
FORMAT
The format used for printing timestamps as text
-
-
Method Details
-
toString
-
toString
Formats an instant in time as concise, human-readable text.- Parameters:
time- an instant in time as the number of milliseconds from the epoch (1970-01-01T00:00:00Z) in Coordinated Universal Time (UTC)- Returns:
- a concise, human-readable text representation of that instant
-
getTimestamp
long getTimestamp()Returns the time this object was created as the number of milliseconds from the epoch (1970-01-01T00:00:00Z) in Coordinated Universal Time (UTC).- Returns:
- the object's timestamp in milliseconds from the epoch in UTC
-