Id
Keywords: net.corda.core.utilities.Id class
Date: 2023-09-18

net.corda.core.utilities

## Class Id<VALUE>

- net.corda.core.utilities.Id<VALUE>

- Direct Known Subclasses:
    Trace.InvocationId, Trace.SessionId

      public class Id<VALUE>

  Represents a unique, timestamped id.

- - ### Field Detail

    - #### Companion

          public static net.corda.core.utilities.Id.Companion Companion

  - ### Constructor Detail

    - #### Id

          public Id(@NotNull
                    VALUE value,
                    @Nullable
                    java.lang.String entityType,
                    @NotNull
                    java.time.Instant timestamp)

      Represents a unique, timestamped id.

      Parameters:
        `value` - unique value of the id.
        `entityType` - optional id entity type.
        `timestamp` - timestamp for the id.

  - ### Method Detail

    - #### equals

          public boolean equals(@Nullable
                                java.lang.Object other)

    - #### hashCode

          public int hashCode()

    - #### toString

          @NotNull
          public java.lang.String toString()

    - #### getValue

          @NotNull
          public VALUE getValue()

      unique value of the id.

    - #### getEntityType

          @Nullable
          public java.lang.String getEntityType()

      optional id entity type.

    - #### getTimestamp

          @NotNull
          public java.time.Instant getTimestamp()

      timestamp for the id.

    - #### newInstance

          @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.

      See Also:
        Instant.now