Package VASSAL.tools.version
Interface VersionTokenizer
- All Known Implementing Classes:
VassalVersionTokenizer
public interface VersionTokenizer
Converts version numbers into a series of integers.
The integers thus returned from two different tokenizers may be
compared to determine the temporal ordering of two versions. Invalid
version numbers may be parsed up to the point where they become invalid.
- Since:
- 3.1.0
- Author:
- Joel Uckelman
- See Also:
VersionFormatException
-
Method Details
-
hasNext
boolean hasNext()Returnstrueif the versionStringis not fully parsed.- Returns:
trueifnext()will return more integers
-
next
Returns an integer representing the next token.- Returns:
- the integer representing the next token
- Throws:
VersionFormatException- if the string deviates from the current version formatting rules at the next token.NoSuchElementException- if this method is called whenhasNext()would returnfalse.
-