Class UserAndTimestamp

java.lang.Object
com.linecorp.centraldogma.server.metadata.UserAndTimestamp

public final class UserAndTimestamp extends Object
Specifies when an object is accessed by whom.
  • Constructor Details

    • UserAndTimestamp

      public UserAndTimestamp(String user)
      Creates a new instance using the current time as a timestamp.
    • UserAndTimestamp

      public UserAndTimestamp(String user, Instant timestamp)
      Creates a new instance.
  • Method Details

    • of

      public static UserAndTimestamp of(Author author)
      Creates a new instance using the specified Author's e-mail address as a user name and the current time as a timestamp.
    • user

      public String user()
      Returns a login name who took any action on this object.
    • timestamp

      public String timestamp()
      Returns a date and time string which is formatted as ISO-8601.
    • timestampMillis

      public long timestampMillis()
      Returns the epoch milliseconds of the timestamp().
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object