diff options
author | Adrien Hopkins <adrien.p.hopkins@gmail.com> | 2025-06-04 19:45:37 -0500 |
---|---|---|
committer | Adrien Hopkins <adrien.p.hopkins@gmail.com> | 2025-06-04 19:45:37 -0500 |
commit | 79e1653caf5c30667877a158433cbcd766a135af (patch) | |
tree | 891527e7365bf78eab3722704c1f74e57fbbca7d /src/main/java/sevenUnits/utils/SemanticVersionNumber.java | |
parent | d80b80857e739eb32afd7625789944abd3afe376 (diff) |
Add version numbers to all @since tags
Specifically, for every @since tag with a date, I added another that
contains the correspending version. I did not add date @since tags to
comments that do not have them, as that would be too tedious for what
it's worth. These dates could still be found by using git bisect
though.
Diffstat (limited to 'src/main/java/sevenUnits/utils/SemanticVersionNumber.java')
-rw-r--r-- | src/main/java/sevenUnits/utils/SemanticVersionNumber.java | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/src/main/java/sevenUnits/utils/SemanticVersionNumber.java b/src/main/java/sevenUnits/utils/SemanticVersionNumber.java index bf198ae..cde3d37 100644 --- a/src/main/java/sevenUnits/utils/SemanticVersionNumber.java +++ b/src/main/java/sevenUnits/utils/SemanticVersionNumber.java @@ -39,8 +39,8 @@ import java.util.regex.Pattern; * are made * </ol> * - * @since v0.4.0 * @since 2022-02-19 + * @since v0.4.0 */ public final class SemanticVersionNumber implements Comparable<SemanticVersionNumber> { @@ -52,8 +52,8 @@ public final class SemanticVersionNumber * throw NullPointerExceptions, everything else throws * IllegalArgumentException. * - * @since v0.4.0 * @since 2022-02-19 + * @since v0.4.0 */ public static final class Builder { private final int major; @@ -69,8 +69,8 @@ public final class SemanticVersionNumber * @param major major version number of final version * @param minor minor version number of final version * @param patch patch version number of final version - * @since v0.4.0 * @since 2022-02-19 + * @since v0.4.0 */ private Builder(int major, int minor, int patch) { this.major = major; @@ -82,8 +82,8 @@ public final class SemanticVersionNumber /** * @return version number created by this builder - * @since v0.4.0 * @since 2022-02-19 + * @since v0.4.0 */ public SemanticVersionNumber build() { return new SemanticVersionNumber(this.major, this.minor, this.patch, @@ -95,8 +95,8 @@ public final class SemanticVersionNumber * * @param identifiers build metadata * @return this builder - * @since v0.4.0 * @since 2022-02-19 + * @since v0.4.0 */ public Builder buildMetadata(List<String> identifiers) { Objects.requireNonNull(identifiers, "identifiers may not be null"); @@ -115,8 +115,8 @@ public final class SemanticVersionNumber * * @param identifiers build metadata * @return this builder - * @since v0.4.0 * @since 2022-02-19 + * @since v0.4.0 */ public Builder buildMetadata(String... identifiers) { Objects.requireNonNull(identifiers, "identifiers may not be null"); @@ -154,8 +154,8 @@ public final class SemanticVersionNumber * * @param identifiers pre-release identifier(s) to add * @return this builder - * @since v0.4.0 * @since 2022-02-19 + * @since v0.4.0 */ public Builder preRelease(int... identifiers) { Objects.requireNonNull(identifiers, "identifiers may not be null"); @@ -173,8 +173,8 @@ public final class SemanticVersionNumber * * @param identifiers pre-release identifier(s) to add * @return this builder - * @since v0.4.0 * @since 2022-02-19 + * @since v0.4.0 */ public Builder preRelease(List<String> identifiers) { Objects.requireNonNull(identifiers, "identifiers may not be null"); @@ -193,8 +193,8 @@ public final class SemanticVersionNumber * * @param identifiers pre-release identifier(s) to add * @return this builder - * @since v0.4.0 * @since 2022-02-19 + * @since v0.4.0 */ public Builder preRelease(String... identifiers) { Objects.requireNonNull(identifiers, "identifiers may not be null"); @@ -214,8 +214,8 @@ public final class SemanticVersionNumber * @param identifier1 first identifier * @param identifier2 second identifier * @return this builder - * @since v0.4.0 * @since 2022-02-19 + * @since v0.4.0 */ public Builder preRelease(String identifier1, int identifier2) { Objects.requireNonNull(identifier1, "identifier1 may not be null"); @@ -280,8 +280,8 @@ public final class SemanticVersionNumber * @param patch patch version number of final version * @return version number builder * @throws IllegalArgumentException if any argument is negative - * @since v0.4.0 * @since 2022-02-19 + * @since v0.4.0 */ public static final SemanticVersionNumber.Builder builder(int major, int minor, int patch) { @@ -304,8 +304,8 @@ public final class SemanticVersionNumber * @param b second list * @return result of comparison as in a comparator * @see Comparator - * @since v0.4.0 * @since 2022-02-20 + * @since v0.4.0 */ private static final int compareIdentifiers(List<String> a, List<String> b) { // test pre-release size @@ -365,8 +365,8 @@ public final class SemanticVersionNumber * * @param versionString string to parse * @return {@code SemanticVersionNumber} instance - * @since v0.4.0 * @since 2022-02-19 + * @since v0.4.0 * @see #toString */ public static final SemanticVersionNumber fromString(String versionString) { @@ -409,8 +409,8 @@ public final class SemanticVersionNumber * * @param versionString string to test * @return true iff string is valid - * @since v0.4.0 * @since 2022-02-19 + * @since v0.4.0 */ public static final boolean isValidVersionString(String versionString) { return VERSION_NUMBER.matcher(versionString).matches(); @@ -429,8 +429,8 @@ public final class SemanticVersionNumber * @throws IllegalArgumentException if any argument is negative or if the * preReleaseType is null, empty or not * alphanumeric (0-9, A-Z, a-z, - only) - * @since v0.4.0 * @since 2022-02-19 + * @since v0.4.0 */ public static final SemanticVersionNumber preRelease(int major, int minor, int patch, String preReleaseType, int preReleaseNumber) { @@ -467,8 +467,8 @@ public final class SemanticVersionNumber * @param patch patch version number * @return {@code SemanticVersionNumber} instance * @throws IllegalArgumentException if any argument is negative - * @since v0.4.0 * @since 2022-02-19 + * @since v0.4.0 */ public static final SemanticVersionNumber stableVersion(int major, int minor, int patch) { @@ -500,8 +500,8 @@ public final class SemanticVersionNumber * @param patch patch version number * @param preReleaseIdentifiers pre-release version data * @param buildMetadata build metadata - * @since v0.4.0 * @since 2022-02-19 + * @since v0.4.0 */ private SemanticVersionNumber(int major, int minor, int patch, List<String> preReleaseIdentifiers, List<String> buildMetadata) { @@ -514,8 +514,8 @@ public final class SemanticVersionNumber /** * @return build metadata (empty if there is none) - * @since v0.4.0 * @since 2022-02-19 + * @since v0.4.0 */ public List<String> buildMetadata() { return Collections.unmodifiableList(this.buildMetadata); @@ -585,8 +585,8 @@ public final class SemanticVersionNumber * @param other version to compare with * @return true if you can definitely upgrade to {@code other} without * changing code - * @since v0.4.0 * @since 2022-02-20 + * @since v0.4.0 */ public boolean compatibleWith(SemanticVersionNumber other) { Objects.requireNonNull(other, "other may not be null"); @@ -639,8 +639,8 @@ public final class SemanticVersionNumber /** * @return true iff this version is stable (major version > 0 and not a * pre-release) - * @since v0.4.0 * @since 2022-02-19 + * @since v0.4.0 */ public boolean isStable() { return this.major > 0 && this.preReleaseIdentifiers.isEmpty(); @@ -649,8 +649,8 @@ public final class SemanticVersionNumber /** * @return the MAJOR version number, incremented when you make backwards * incompatible API changes - * @since v0.4.0 * @since 2022-02-19 + * @since v0.4.0 */ public int majorVersion() { return this.major; @@ -659,8 +659,8 @@ public final class SemanticVersionNumber /** * @return the MINOR version number, incremented when you add backwards * compatible functionality - * @since v0.4.0 * @since 2022-02-19 + * @since v0.4.0 */ public int minorVersion() { return this.minor; @@ -669,8 +669,8 @@ public final class SemanticVersionNumber /** * @return the PATCH version number, incremented when you make backwards * compatible bug fixes - * @since v0.4.0 * @since 2022-02-19 + * @since v0.4.0 */ public int patchVersion() { return this.patch; @@ -679,8 +679,8 @@ public final class SemanticVersionNumber /** * @return identifiers describing this pre-release (empty if not a * pre-release) - * @since v0.4.0 * @since 2022-02-19 + * @since v0.4.0 */ public List<String> preReleaseIdentifiers() { return Collections.unmodifiableList(this.preReleaseIdentifiers); |