Class AbstractRandomBasedUuidCreator

    • Constructor Detail

      • AbstractRandomBasedUuidCreator

        public AbstractRandomBasedUuidCreator​(UuidVersion version)
    • Method Detail

      • create

        public UUID create()
        Returns a random-based UUID. ### RFC-4122 - 4.4. Algorithms for Creating a UUID from Truly Random or Pseudo-Random Numbers (1) Set the two most significant bits (bits 6 and 7) of the clock_seq_hi_and_reserved to zero and one, respectively. (2) Set the four most significant bits (bits 12 through 15) of the time_hi_and_version field to the 4-bit version number from Section 4.1.3. (3) Set all the other bits to randomly (or pseudo-randomly) chosen values.
        Specified by:
        create in interface NoArgumentsUuidCreator
        Returns:
        a random-based UUID