| Modifier and Type | Class and Description |
|---|---|
| protected static enum | AbstractVersionIterator.
The current state of iteration. |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv long | |
| protected final String | string
The version string being iterated. |
| Access | Constructor and Description |
|---|---|
| protected | AbstractVersionIterator(final String
the version string (must not be string)null)Construct a new instance. |
| Modifier and Type | Method and Description |
|---|---|
| public StringBuilder | appendAlphaPartTo(final StringBuilder
the StringBuilder to append target)Implements io. Append the current alphabetical part to the given string builder. |
| public StringBuilder | appendNumberPartTo(final StringBuilder
the StringBuilder to append target)Implements io. Get the current numeric part, appending it to the given builder. |
| public StringBuilder | appendPartTo(final StringBuilder
the string builder (must not be target)null)Implements io. Append this version part to the given string builder. |
| protected void | changeType(AbstractVersionIterator.
the new type (must not be newTypenull)Change the current token type. |
| public int | compareAlphaPart(final String
the string to compare against (must not be str, final int null)the offset into the string to compare offs, final int the length to compare len, final boolean true to perform a case-insensitive comparison, or false to perform a
case-sensitive comparisonImplements io. Compare two alphabetical parts lexicographically. |
| public int | compareAlphaPart(final VersionIterator
the other iterator (must not be other, final boolean null)a boolean to ignore case in the compare ignoreCase)Implements io. Compare two alphabetical parts lexicographically. |
| public int | compareNumberPart(final int
the number to compare against value)Implements io. Compare two numerical parts (using an unsigned comparison). |
| public int | compareNumberPart(final long
the number to compare against value)Implements io. Compare two numerical parts (using an unsigned comparison). |
| public int | compareNumberPart(final String
the number to compare against value, int the offset into the string to compare offs, int the length to compare len)Implements io. Compare two numerical parts (using an unsigned comparison). |
| public int | compareNumberPart(final VersionIterator
the other iterator (must not be other)null)Implements io. Compare two numerical parts (using an unsigned comparison). |
| pack-priv static int | |
| pack-priv static int | |
| pack-priv static int | |
| pack-priv static AbstractVersionIterator. | |
| protected AbstractVersionIterator. | |
| public String | getAlphaPart()
Implements io. Get the current alphabetical part. |
| protected int | Returns: the index into the version stringGet the end index (exclusive) of the current token. |
| protected int | |
| public int | getNumberPartAsInt()
Implements io. Get the current numeric part, as an |
| public long | getNumberPartAsLong()
Implements io. Get the current numeric part, as a |
| public String | getNumberPartAsString()
Overrides default io. Get the current numeric part, as a |
| public int | getSeparatorCodePoint()
Implements io. Get the code point of the current separator. |
| protected int | |
| public boolean | Returns: true if there are more characters after the current token, false otherwiseImplements io. A basic implementation of |
| protected void | |
| protected void | |
| protected void | |
| protected boolean | Returns: true if the code point is a valid letter, or false otherwisethe code point to test cp)Determine whether the given code point is a valid alpha code point according to the current scheme. |
| public boolean | isAlphaPart()
Implements io. Determine if the current token is an alphabetical part. |
| public boolean | isEmptySeparator()
Implements io. Determine if the current token is an empty (or zero-length alphabetical-to-numeric or numeric-to-alphabetical) separator. |
| public boolean | isNonEmptySeparator()
Implements io. Determine if the current token is a non-empty separator. |
| public boolean | isNumberPart()
Implements io. Determine if the current token is a numeric part. |
| public boolean | isPart()
Overrides default io. Determine if the current token is some kind of part (alphabetical or numeric). |
| public boolean | isSeparator()
Overrides default io. Determine if the current token is some kind of separator (a character or a zero-length alphabetical-to-numeric or numeric-to-alphabetical transition). |
| protected boolean | Returns: true if the code point is a separator, or false otherwisethe code point to test cp)Determine whether the given code point is a valid separator according to the current scheme. |
| public int | length()
Implements io. Get the length of the current token. |
| pack-priv static long | makeCookie(final long start, final long end, final AbstractVersionIterator.
|
| protected long | |
| public void | next()
Implements io. A basic implementation of |
| protected int | Returns: the numerical value of the given code point, or-1 if the code point is not a valid numerical digit
for this version schemethe code point to test cp)Determine whether the given code point is a valid numeric code point according to the current scheme, and if so, what the digit's numerical value is. |
| protected void | |
| protected void | setCurrentToken(AbstractVersionIterator.
the token type (must not be tokenType,null)the start index startIndex, int the end index endIndex, int extra implementation-specific state bits extraBits)Set the current token. |
| private boolean | |
| public String |
| cookie | back to summary |
|---|---|
| pack-priv long cookie | |
| string | back to summary |
|---|---|
| protected final String string The version string being iterated. | |
| AbstractVersionIterator | back to summary |
|---|---|
| protected AbstractVersionIterator(final String string) Construct a new instance.
| |
| appendAlphaPartTo | back to summary |
|---|---|
| public StringBuilder appendAlphaPartTo(final StringBuilder target) throws IllegalStateException Implements io. Doc from io. 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(final StringBuilder target) throws IllegalStateException Implements io. Doc from io. 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(final StringBuilder target) Implements io. Doc from io. Append this version part to the given string builder. This is used to produce a canonical representation of an input string.
| |
| changeType | back to summary |
|---|---|
| protected void changeType(AbstractVersionIterator. Change the current token type.
| |
| compareAlphaPart | back to summary |
|---|---|
| public int compareAlphaPart(final String str, final int offs, final int len, final boolean ignoreCase) throws IllegalStateException, StringIndexOutOfBoundsException Implements io. Doc from io. 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(final VersionIterator other, final boolean ignoreCase) throws IllegalStateException Implements io. Doc from io. 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(final int value) throws IllegalStateException Implements io. Doc from io. 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(final long value) throws IllegalStateException Implements io. Doc from io. 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(final String value, int offs, int len) throws IllegalStateException Implements io. Doc from io. 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(final VersionIterator other) Implements io. Doc from io. Compare two numerical parts (using an unsigned comparison). Both iterators must be positioned at a numerical part or an exception is thrown.
| |
| cookieToEndIndex | back to summary |
|---|---|
| pack-priv static int cookieToEndIndex(long cookie) | |
| cookieToExtraBits | back to summary |
|---|---|
| pack-priv static int cookieToExtraBits(long cookie) | |
| cookieToStartIndex | back to summary |
|---|---|
| pack-priv static int cookieToStartIndex(long cookie) | |
| cookieType | back to summary |
|---|---|
| pack-priv static AbstractVersionIterator. | |
| currentType | back to summary |
|---|---|
| protected AbstractVersionIterator. Get the current iteration token type.
| |
| getAlphaPart | back to summary |
|---|---|
| public String getAlphaPart() throws IllegalStateException Implements io. Doc from io. Get the current alphabetical part. If the iterator is not positioned on an alphabetical part (i.e.
| |
| getEndIndex | back to summary |
|---|---|
| protected int getEndIndex() Get the end index (exclusive) of the current token. The length
| |
| getExtraBits | back to summary |
|---|---|
| protected int getExtraBits() Get the extra implementation-specific state bits.
| |
| getNumberPartAsInt | back to summary |
|---|---|
| public int getNumberPartAsInt() Implements io. Doc from io. Get the current numeric part, as an
| |
| getNumberPartAsLong | back to summary |
|---|---|
| public long getNumberPartAsLong() Implements io. Doc from io. Get the current numeric part, as a
| |
| getNumberPartAsString | back to summary |
|---|---|
| public String getNumberPartAsString() throws IllegalStateException Overrides default io. Doc from io. Get the current numeric part, as a
| |
| getSeparatorCodePoint | back to summary |
|---|---|
| public int getSeparatorCodePoint() Implements io. Doc from io. Get the code point of the current separator. If the iterator is not positioned on a non-empty separator
(i.e.
| |
| getStartIndex | back to summary |
|---|---|
| protected int getStartIndex() Get the start index of the current token.
| |
| hasNext | back to summary |
|---|---|
| public boolean hasNext() Implements io. A basic implementation of
| |
| insertEmptyAlpha | back to summary |
|---|---|
| protected void insertEmptyAlpha() Insert an empty part into the current position. | |
| insertEmptyNumber | back to summary |
|---|---|
| protected void insertEmptyNumber() Insert an empty (zero) number into the current position. | |
| insertEmptySeparator | back to summary |
|---|---|
| protected void insertEmptySeparator() Insert an empty separator into the current position. | |
| isAlphaCodePoint | back to summary |
|---|---|
| protected boolean isAlphaCodePoint(int cp) Determine whether the given code point is a valid alpha code point according to the current scheme. This
basic implementation returns
| |
| isAlphaPart | back to summary |
|---|---|
| public boolean isAlphaPart() Implements io. Doc from io. Determine if the current token is an alphabetical part.
| |
| isEmptySeparator | back to summary |
|---|---|
| public boolean isEmptySeparator() Implements io. Doc from io. 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() Implements io. Doc from io. Determine if the current token is a non-empty separator.
| |
| isNumberPart | back to summary |
|---|---|
| public boolean isNumberPart() Implements io. Doc from io. Determine if the current token is a numeric part.
| |
| isPart | back to summary |
|---|---|
| public boolean isPart() Overrides default io. Doc from io. Determine if the current token is some kind of part (alphabetical or numeric).
| |
| isSeparator | back to summary |
|---|---|
| public boolean isSeparator() Overrides default io. Doc from io. Determine if the current token is some kind of separator (a character or a zero-length alphabetical-to-numeric or numeric-to-alphabetical transition).
| |
| isSeparatorCodePoint | back to summary |
|---|---|
| protected boolean isSeparatorCodePoint(int cp) Determine whether the given code point is a valid separator according to the current scheme. This basic
implementation returns
| |
| length | back to summary |
|---|---|
| public int length() Implements io. Doc from io. Get the length of the current token. If there is no current token, zero is returned.
| |
| makeCookie | back to summary |
|---|---|
| pack-priv static long makeCookie(final long start, final long end, final AbstractVersionIterator. | |
| mark | back to summary |
|---|---|
| protected long mark() Mark the current iteration position and state.
| |
| next | back to summary |
|---|---|
| public void next() throws NoSuchElementException, VersionSyntaxException Implements io. A basic implementation of
| |
| numericCodePointValue | back to summary |
|---|---|
| protected int numericCodePointValue(int cp) Determine whether the given code point is a valid numeric code point according to the current scheme, and if
so, what the digit's numerical value is. This basic implementation delegates to
| |
| reset | back to summary |
|---|---|
| protected void reset(long mark) Restore the iteration position to a previous
| |
| setCurrentToken | back to summary |
|---|---|
| protected void setCurrentToken(AbstractVersionIterator. Set the current token.
| |
| thisHasNext | back to summary |
|---|---|
| private boolean thisHasNext() | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final AbstractVersionIterator. | INITIAL
The initial state. |
| public static final AbstractVersionIterator. | INVALID
An invalid state. |
| public static final AbstractVersionIterator. | PART_ALPHA
A part of the version string which is an alpha part. |
| public static final AbstractVersionIterator. | PART_NUMBER
A part of the version string which is a numeric part. |
| public static final AbstractVersionIterator. | SEP
A non-empty separator character. |
| public static final AbstractVersionIterator. | SEP_EMPTY
A separator character. |
| pack-priv static AbstractVersionIterator. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static AbstractVersionIterator. | |
| public static AbstractVersionIterator. |
| INITIAL | back to summary |
|---|---|
| public static final AbstractVersionIterator. The initial state. | |
| INVALID | back to summary |
|---|---|
| public static final AbstractVersionIterator. An invalid state. | |
| PART_ALPHA | back to summary |
|---|---|
| public static final AbstractVersionIterator. A part of the version string which is an alpha part. | |
| PART_NUMBER | back to summary |
|---|---|
| public static final AbstractVersionIterator. A part of the version string which is a numeric part. | |
| SEP | back to summary |
|---|---|
| public static final AbstractVersionIterator. A non-empty separator character. | |
| SEP_EMPTY | back to summary |
|---|---|
| public static final AbstractVersionIterator. A separator character. | |
| values | back to summary |
|---|---|
| pack-priv static AbstractVersionIterator. | |
| TokenType | back to summary |
|---|---|
| private TokenType() | |
| valueOf | back to summary |
|---|---|
| public static AbstractVersionIterator. | |
| values | back to summary |
|---|---|
| public static AbstractVersionIterator. | |