public class Id<VALUE>
Represents a unique, timestamped id.
public Id(@NotNull VALUE value, @Nullable java.lang.String entityType, @NotNull java.time.Instant timestamp)
Represents a unique, timestamped id.
value
- unique value of the id.entityType
- optional id entity type.timestamp
- timestamp for the id.public boolean equals(@Nullable java.lang.Object other)
public int hashCode()
@NotNull public java.lang.String toString()
@NotNull public VALUE getValue()
unique value of the id.
@Nullable public java.lang.String getEntityType()
optional id entity type.
@NotNull public java.time.Instant getTimestamp()
timestamp for the id.
@JvmStatic @NotNull public static <V> Id<V> newInstance(@NotNull V value, @Nullable java.lang.String entityType, @NotNull java.time.Instant timestamp)
Creates an id using Instant.now as timestamp.