Package VASSAL.tools.version
Class VassalVersionTokenizer
java.lang.Object
VASSAL.tools.version.VassalVersionTokenizer
- All Implemented Interfaces:
VersionTokenizer
@Deprecated(since="2020-08-28",
forRemoval=true)
public class VassalVersionTokenizer
extends Object
implements VersionTokenizer
Deprecated, for removal: This API element is subject to removal in a future version.
A finite-state machine for converting VASSAL 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
VASSAL versions.
Valid version strings are dotted decimal digits, followed optionally
by a tag, followed optionally by a build number. Anything beyond the
build number is ignored.
Old version numbers which are not valid by current standards (e.g., 3.0b6)
may be successfully parsed far enough to determine their ordering with
respect to post-3.1.0 versions.
- Since:
- 3.1.0
- Author:
- Joel Uckelman
- See Also:
VersionFormatException
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
Deprecated, for removal: This API element is subject to removal in a future version. -
Field Summary
Modifier and TypeFieldDescriptionprotected VassalVersionTokenizer.State
Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.protected String
Deprecated, for removal: This API element is subject to removal in a future version. -
Constructor Summary
ConstructorDescriptionVassalVersionTokenizer(String version)
Deprecated, for removal: This API element is subject to removal in a future version.Constructs aVersionTokenizer
which operates on a versionString
. -
Method Summary
Modifier and TypeMethodDescriptionboolean
hasNext()
Deprecated, for removal: This API element is subject to removal in a future version.Returnstrue
if the versionString
is not fully parsed.int
next()
Deprecated, for removal: This API element is subject to removal in a future version.Returns an integer representing the next token.
-
Field Details
-
v
Deprecated, for removal: This API element is subject to removal in a future version. -
state
Deprecated, for removal: This API element is subject to removal in a future version. -
tags
Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Constructor Details
-
VassalVersionTokenizer
Deprecated, for removal: This API element is subject to removal in a future version.Constructs aVersionTokenizer
which operates on a versionString
.- Parameters:
version
- the versionString
to parse- Throws:
IllegalArgumentException
- ifversion == null
.
-
-
Method Details
-
hasNext
public boolean hasNext()Deprecated, for removal: This API element is subject to removal in a future version.Returnstrue
if the versionString
is not fully parsed.- Specified by:
hasNext
in interfaceVersionTokenizer
- Returns:
true
ifVersionTokenizer.next()
will return more integers
-
next
Deprecated, for removal: This API element is subject to removal in a future version.Returns an integer representing the next token.- Specified by:
next
in interfaceVersionTokenizer
- Returns:
- the integer representing the next token
- Throws:
VersionFormatException
- if the string deviates from the current version formatting rules at the next token.
-