Class Id

java.lang.Object
org.jboss.elemento.Id

public final class Id extends Object
Helper methods for working with IDs.
  • Method Details

    • uuid

      public static String uuid()
      Generates a universally unique identifier (UUID). If the global crypto property is available, Crypto.randomUUID() is used to generate the UUID. Otherwise, a pseudo random UUID is generated as fallback.
      See Also:
    • unique

      public static String unique()
      Creates an identifier guaranteed to be unique within this document. This is useful for allocating element IDs.
    • unique

      public static String unique(String id, String... additionalIds)
      Creates an identifier guaranteed to be unique within this document. The unique part comes last.
    • build

      public static String build(String id, String... additionalIds)