Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New factory method to create TimeBasedEpochRandomGenerator #99

Merged
merged 3 commits into from
Feb 28, 2024

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
4 checks passed
@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