diff --git a/version/src/main/java/io/smallrye/common/version/AbstractVersionIterator.java b/version/src/main/java/io/smallrye/common/version/AbstractVersionIterator.java index 0d9315c..fde8f98 100644 --- a/version/src/main/java/io/smallrye/common/version/AbstractVersionIterator.java +++ b/version/src/main/java/io/smallrye/common/version/AbstractVersionIterator.java @@ -11,6 +11,9 @@ * version strings which are greater than 4095 characters in length. */ public abstract class AbstractVersionIterator implements VersionIterator { + /** + * The version string being iterated. + */ protected final String string; long cookie; @@ -18,13 +21,30 @@ public abstract class AbstractVersionIterator implements VersionIterator { * The current state of iteration. */ protected enum TokenType { + /** + * The initial state. + */ INITIAL, + /** + * A part of the version string which is an alpha part. + */ PART_ALPHA, + /** + * A part of the version string which is a numeric part. + */ PART_NUMBER, + /** + * A separator character. + */ SEP_EMPTY, + /** + * A non-empty separator character. + */ SEP, - INVALID, - ; + /** + * An invalid state. + */ + INVALID; static TokenType[] values = values(); } diff --git a/version/src/main/java/io/smallrye/common/version/VersionScheme.java b/version/src/main/java/io/smallrye/common/version/VersionScheme.java index 3de0ad6..ced6e45 100644 --- a/version/src/main/java/io/smallrye/common/version/VersionScheme.java +++ b/version/src/main/java/io/smallrye/common/version/VersionScheme.java @@ -149,7 +149,7 @@ default Predicate fromRangeString(String range) { /** * Parse a range specification and return it as a predicate. * Version ranges are governed by the following general syntax: - *
+     * 
 range ::= range-spec ',' range
         | range-spec
 
@@ -163,7 +163,7 @@ default Predicate fromRangeString(String range) {
 max-version ::= version ']'
               | version ')'
               | ')'
-
+
* This is aligned with the syntax used by Maven, however it can be applied to any * supported version scheme. *