hasNext() and next() methods to move the cursor to each segment of the version string in turn.
| Modifier and Type | Method and Description |
|---|---|
| public default boolean | Returns: true if the segment matches the given string; false otherwisethe string to compare (must not be str, boolean null)true to perform a case-insensitive comparison, or false to perform a
case-sensitive comparisonDetermine whether the current alphabetical part is equal to the given test string. |
| public default boolean | Returns: true if the segment matches the given string; false otherwisethe string to compare (must not be str, int null)the offset into the string to compare offs, int the length to compare len, boolean true to perform a case-insensitive comparison, or false to perform a
case-sensitive comparisonDetermine whether the current alphabetical part is equal to the given test string. |
| public StringBuilder | Returns: the current alphabetical partthe StringBuilder to append target)Append the current alphabetical part to the given string builder. |
| public StringBuilder | Returns: the current numeric part as aStringthe StringBuilder to append target)Get the current numeric part, appending it to the given builder. |
| public StringBuilder | Returns: the same string builder (notnull)the string builder (must not be b)null)Append this version part to the given string builder. |
| public default int | Returns: -1, 0, or 1 if this segment is less than, equal to, or greater than the given
stringthe string to compare against (must not be str, boolean null)true to perform a case-insensitive comparison, or false to perform a
case-sensitive comparisonCompare two alphabetical parts lexicographically. |
| public int | Returns: -1, 0, or 1 if this segment is less than, equal to, or greater than the given
stringthe string to compare against (must not be str, int null)the offset into the string to compare offs, int the length to compare len, boolean true to perform a case-insensitive comparison, or false to perform a
case-sensitive comparisonCompare two alphabetical parts lexicographically. |
| public int | Returns: -1, 0, or 1 if this segment is less than, equal to, or greater than the other
iterator's partthe other iterator (must not be other, boolean null)a boolean to ignore case in the compare ignoreCase)Compare two alphabetical parts lexicographically. |
| public int | Returns: -1, 0, or 1 if this segment is less than, equal to, or greater than the given
valuethe number to compare against value)Compare two numerical parts (using an unsigned comparison). |
| public int | Returns: -1, 0, or 1 if this segment is less than, equal to, or greater than the given
valuethe number to compare against value)Compare two numerical parts (using an unsigned comparison). |
| public default int | Returns: -1, 0, or 1 if this segment is less than, equal to, or greater than the given
valuethe number to compare against value)Compare two numerical parts (using an unsigned comparison). |
| public int | Returns: -1, 0, or 1 if this segment is less than, equal to, or greater than the given
valuethe number to compare against value, int the offset into the string to compare offs, int the length to compare len)Compare two numerical parts (using an unsigned comparison). |
| public int | Returns: -1, 0, or 1 if this segment is less than, equal to, or greater than the other
iterator's partthe other iterator (must not be other)null)Compare two numerical parts (using an unsigned comparison). |
| public String | |
| public default BigInteger | Returns: the current numeric part as aBigIntegerGet the current numeric part, as a |
| public int | Returns: the current numeric part as anintGet the current numeric part, as an |
| public long | Returns: the current numeric part as alongGet the current numeric part, as a |
| public default String | Returns: the current numeric part as aStringGet the current numeric part, as a |
| public int | Returns: the code point of the current separatorGet the code point of the current separator. |
| public boolean | Returns: true if more tokens remain, false otherwiseDetermine whether a subsequent token exists in this version. |
| public boolean | Returns: true if the token is an alphabetical part, false otherwiseDetermine if the current token is an alphabetical part. |
| public boolean | Returns: true if the token is an empty separator, false otherwiseDetermine if the current token is an empty (or zero-length alphabetical-to-numeric or numeric-to-alphabetical) separator. |
| public boolean | Returns: true if the token is a non-empty separator, false otherwiseDetermine if the current token is a non-empty separator. |
| public boolean | Returns: true if the token is a numeric part, false otherwiseDetermine if the current token is a numeric part. |
| public default boolean | Returns: true if the token is a part, false otherwiseDetermine if the current token is some kind of part (alphabetical or numeric). |
| public default boolean | Returns: true if the token is a separator, false otherwiseDetermine if the current token is some kind of separator (a character or a zero-length alphabetical-to-numeric or numeric-to-alphabetical transition). |
| public int | |
| public void | |
| public default boolean | Returns: true if the values are equal, or false otherwisethe unsigned value value)Determine whether the current numeric part equals the given value (which is treated as unsigned). |
| public default boolean | Returns: true if the values are equal, or false otherwisethe unsigned value value)Determine whether the current numeric part equals the given value (which is treated as unsigned). |
| alphaPartEquals | back to summary |
|---|---|
| public default boolean alphaPartEquals(String str, boolean ignoreCase) throws IllegalStateException Determine whether the current alphabetical part is equal to the given test string. If the iterator is not
positioned on an alphabetical part (i.e.
| |
| alphaPartEquals | back to summary |
|---|---|
| public default boolean alphaPartEquals(String str, int offs, int len, boolean ignoreCase) throws IllegalStateException, StringIndexOutOfBoundsException Determine whether the current alphabetical part is equal to the given test string. If the iterator is not
positioned on an alphabetical part (i.e.
| |
| appendAlphaPartTo | back to summary |
|---|---|
| public StringBuilder appendAlphaPartTo(StringBuilder target) throws IllegalStateException Append the current alphabetical part to the given string builder. If the iterator is not positioned on an
alphabetical part (i.e.
| |
| appendNumberPartTo | back to summary |
|---|---|
| public StringBuilder appendNumberPartTo(StringBuilder target) throws IllegalStateException Get the current numeric part, appending it to the given builder. If the iterator is not positioned on a numeric
part (i.e.
| |
| appendPartTo | back to summary |
|---|---|
| public StringBuilder appendPartTo(StringBuilder b) Append this version part to the given string builder. This is used to produce a canonical representation of an input string.
| |
| compareAlphaPart | back to summary |
|---|---|
| public default int compareAlphaPart(String str, boolean ignoreCase) throws IllegalStateException Compare two alphabetical parts lexicographically. This iterator must be positioned at an alphabetical part or an exception is thrown.
| |
| compareAlphaPart | back to summary |
|---|---|
| public int compareAlphaPart(String str, int offs, int len, boolean ignoreCase) throws IllegalStateException, StringIndexOutOfBoundsException Compare two alphabetical parts lexicographically. This iterator must be positioned at an alphabetical part or an exception is thrown.
| |
| compareAlphaPart | back to summary |
|---|---|
| public int compareAlphaPart(VersionIterator other, boolean ignoreCase) throws IllegalStateException Compare two alphabetical parts lexicographically. Both this and the other iterator must be positioned at alphabetical parts or an exception is thrown.
| |
| compareNumberPart | back to summary |
|---|---|
| public int compareNumberPart(int value) throws IllegalStateException Compare two numerical parts (using an unsigned comparison). This iterator must be positioned at a numerical part or an exception is thrown.
| |
| compareNumberPart | back to summary |
|---|---|
| public int compareNumberPart(long value) throws IllegalStateException Compare two numerical parts (using an unsigned comparison). This iterator must be positioned at a numerical part or an exception is thrown.
| |
| compareNumberPart | back to summary |
|---|---|
| public default int compareNumberPart(String value) throws IllegalStateException Compare two numerical parts (using an unsigned comparison). This iterator must be positioned at a numerical part or an exception is thrown. The given string must be numeric according to the rules of this iterator or an exception is thrown.
| |
| compareNumberPart | back to summary |
|---|---|
| public int compareNumberPart(String value, int offs, int len) throws IllegalStateException Compare two numerical parts (using an unsigned comparison). This iterator must be positioned at a numerical part or an exception is thrown. The given string must be numeric according to the rules of this iterator or an exception is thrown.
| |
| compareNumberPart | back to summary |
|---|---|
| public int compareNumberPart(VersionIterator other) Compare two numerical parts (using an unsigned comparison). Both iterators must be positioned at a numerical part or an exception is thrown.
| |
| getAlphaPart | back to summary |
|---|---|
| public String getAlphaPart() throws IllegalStateException Get the current alphabetical part. If the iterator is not positioned on an alphabetical part (i.e.
| |
| getNumberPartAsBigInteger | back to summary |
|---|---|
| public default BigInteger getNumberPartAsBigInteger() throws IllegalStateException Get the current numeric part, as a
| |
| getNumberPartAsInt | back to summary |
|---|---|
| public int getNumberPartAsInt() throws IllegalStateException Get the current numeric part, as an
| |
| getNumberPartAsLong | back to summary |
|---|---|
| public long getNumberPartAsLong() throws IllegalStateException Get the current numeric part, as a
| |
| getNumberPartAsString | back to summary |
|---|---|
| public default String getNumberPartAsString() throws IllegalStateException Get the current numeric part, as a
| |
| getSeparatorCodePoint | back to summary |
|---|---|
| public int getSeparatorCodePoint() Get the code point of the current separator. If the iterator is not positioned on a non-empty separator
(i.e.
| |
| hasNext | back to summary |
|---|---|
| public boolean hasNext() Determine whether a subsequent token exists in this version.
| |
| isAlphaPart | back to summary |
|---|---|
| public boolean isAlphaPart() Determine if the current token is an alphabetical part.
| |
| isEmptySeparator | back to summary |
|---|---|
| public boolean isEmptySeparator() Determine if the current token is an empty (or zero-length alphabetical-to-numeric or numeric-to-alphabetical) separator. Note that some version schemes do not have empty separators.
| |
| isNonEmptySeparator | back to summary |
|---|---|
| public boolean isNonEmptySeparator() Determine if the current token is a non-empty separator.
| |
| isNumberPart | back to summary |
|---|---|
| public boolean isNumberPart() Determine if the current token is a numeric part.
| |
| isPart | back to summary |
|---|---|
| public default boolean isPart() Determine if the current token is some kind of part (alphabetical or numeric).
| |
| isSeparator | back to summary |
|---|---|
| public default boolean isSeparator() Determine if the current token is some kind of separator (a character or a zero-length alphabetical-to-numeric or numeric-to-alphabetical transition).
| |
| length | back to summary |
|---|---|
| public int length() Get the length of the current token. If there is no current token, zero is returned.
| |
| next | back to summary |
|---|---|
| public void next() throws NoSuchElementException, VersionSyntaxException Move to the next token.
| |
| numberPartEquals | back to summary |
|---|---|
| public default boolean numberPartEquals(int value) throws IllegalStateException Determine whether the current numeric part equals the given value (which is treated as unsigned).
| |
| numberPartEquals | back to summary |
|---|---|
| public default boolean numberPartEquals(long value) throws IllegalStateException Determine whether the current numeric part equals the given value (which is treated as unsigned).
| |