Skip to content

Conversation

worldtiki
Copy link
Contributor

  • Add factory method to create TimeBasedEpochRandomGenerator without having to specify a random number generator
  • Also updated the docs so they are consisted with the other methods in the same class

@@ -61,6 +61,16 @@ public void testExtractTimestampUUIDEpochBased() {
}
}

public void testExtractTimestampUUIDEpochRandomBased() {
TimeBasedEpochRandomGenerator generator = Generators.timeBasedEpochRandomGenerator();
final Random rnd = new Random(3);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah ok so this Random is just for timestamp, but otherwise we get sort of arbitrary SecureRandom.
I guess that's about what we can verify.

@cowtowncoder cowtowncoder merged commit aa73bd3 into cowtowncoder:master Feb 28, 2024
@worldtiki worldtiki deleted the utility_method branch February 28, 2024 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants