|
Quilt Loader 1
|
Represents a Semantic Version. More...
Public Member Functions | |
| int | getVersionComponentCount () |
| Returns the number of components in this version. | |
| int | getVersionComponent (int pos) |
Returns the version component at pos. | |
| Optional< String > | getPrereleaseKey () |
| Returns the prerelease key in the version notation. | |
| Optional< String > | getBuildKey () |
| Returns the build key in the version notation. | |
| boolean | hasWildcard () |
| Returns if a wildcard notation is present in this version. | |
| default int | compareTo (SemanticVersion o) |
| Public Member Functions inherited from net.fabricmc.loader.api.Version | |
| String | getFriendlyString () |
| Returns the user-friendly representation of this version. | |
Static Public Member Functions | |
| static SemanticVersion | parse (String s) throws VersionParsingException |
| Parses a semantic version from a string notation. | |
Public Attributes | |
| int | COMPONENT_WILDCARD = Integer.MIN_VALUE |
| The value of version component that indicates a wildcard. | |
Represents a Semantic Version.
Compared to a regular Version, this type of version receives better support for version comparisons in dependency notations, and is preferred.
|
inline |
compareTo(Version) instead | Optional< String > net.fabricmc.loader.api.SemanticVersion.getBuildKey | ( | ) |
Returns the build key in the version notation.
The build key is indicated by a + in the version notation.
Implemented in net.fabricmc.loader.impl.util.version.SemanticVersionImpl, net.fabricmc.loader.util.version.SemanticVersionImpl, and org.quiltmc.loader.impl.fabric.util.version.Quilt2FabricSemanticVersion.
| Optional< String > net.fabricmc.loader.api.SemanticVersion.getPrereleaseKey | ( | ) |
Returns the prerelease key in the version notation.
The prerelease key is indicated by a - before a + in the version notation.
Implemented in net.fabricmc.loader.impl.util.version.SemanticVersionImpl, net.fabricmc.loader.util.version.SemanticVersionImpl, and org.quiltmc.loader.impl.fabric.util.version.Quilt2FabricSemanticVersion.
| int net.fabricmc.loader.api.SemanticVersion.getVersionComponent | ( | int | pos | ) |
Returns the version component at pos.
May return COMPONENT_WILDCARD to indicate a wildcard component.
If the pos exceeds the number of components, returns COMPONENT_WILDCARD if the version has wildcard; otherwise returns 0.
| pos | the position to check |
Implemented in net.fabricmc.loader.impl.util.version.SemanticVersionImpl, net.fabricmc.loader.util.version.SemanticVersionImpl, and org.quiltmc.loader.impl.fabric.util.version.Quilt2FabricSemanticVersion.
| int net.fabricmc.loader.api.SemanticVersion.getVersionComponentCount | ( | ) |
Returns the number of components in this version.
For example, 1.3.x has 3 components.
Implemented in net.fabricmc.loader.impl.util.version.SemanticVersionImpl, net.fabricmc.loader.util.version.SemanticVersionImpl, and org.quiltmc.loader.impl.fabric.util.version.Quilt2FabricSemanticVersion.
| boolean net.fabricmc.loader.api.SemanticVersion.hasWildcard | ( | ) |
Returns if a wildcard notation is present in this version.
A wildcard notation is a x, X, or * in the version string, such as 2.5.*.
Implemented in net.fabricmc.loader.impl.util.version.SemanticVersionImpl, net.fabricmc.loader.util.version.SemanticVersionImpl, and org.quiltmc.loader.impl.fabric.util.version.Quilt2FabricSemanticVersion.
|
inlinestatic |
Parses a semantic version from a string notation.
| s | the string notation of the version |
| VersionParsingException | if a problem arises during version parsing |
Implements net.fabricmc.loader.api.Version.