cowtowncoder / java-uuid-generator

Java Uuid Generator (JUG) is a Java library for generating all standard UUID versions (v1 - v7)
Apache License 2.0
730 stars 104 forks source link

Ensure correct distinction between variant and version in documentation #67

Closed mindloaf closed 1 year ago

mindloaf commented 1 year ago

The documentation in the README and the code is using the word "variant" where "version" should be used. For example, the README has the following:

UUID uuid = Generators.timeBasedGenerator().generate(); // Variant 1
UUID uuid = Generators.randomBasedGenerator().generate(); // Variant 4
UUID uuid = Generators.nameBasedgenerator().generate("string to hash"); // Variant 5
// With JUG 4.1+: support for https://github.com/uuid6/uuid6-ietf-draft variants 6 and 7:
UUID uuid = Generators.timeBasedReorderedGenerator().generate(); // Variant 6
UUID uuid = Generators.timeBasedEpochGenerator().generate(); // Variant 7

These are referring to the UUID Versions (See: https://www.rfc-editor.org/rfc/rfc4122#section-4.1.3). The Variant of a UUID is distinct from the Version, and is tracked separately (See: https://www.rfc-editor.org/rfc/rfc4122#section-4.1.1). Also see https://www.ietf.org/archive/id/draft-peabody-dispatch-new-uuid-format-04.html#name-variant-and-version-fields.

cowtowncoder commented 1 year ago

Interesting. Yes, you are right, there seems to be difference.

Do you think you could propose a PR for changes? I'd be happy review and merge.

cowtowncoder commented 1 year ago

Fixed via #68.