|
Quilt Loader 1
|
Representation of a version. More...
Classes | |
| interface | Raw |
A string version, sorted with String#compareTo(String). More... | |
| interface | Semantic |
| Representation of a semantic version. More... | |
Public Member Functions | |
| String | raw () |
| default boolean | isSemantic () |
| default Semantic | semantic () |
| int | compareTo (Version other) |
If both this and the given version are semantic versions then this compares with the behaviour of Semantic#compareTo(Semantic). | |
Static Public Member Functions | |
| static Version | of (String raw) |
Static Public Attributes | |
| static Comparator< Version > | COMPARATOR = Version::compareTo |
Calls Version#compareTo(Version): this doesn't accept nulls. | |
Representation of a version.
All implementations either implement Raw or Semantic.
Unfortunately (due to Version.Semantic already implementing Comparable) this doesn't implement Comparable directly. Instead you can either use compareTo(Version) or COMPARATOR for all your comparing needs.
| int org.quiltmc.loader.api.Version.compareTo | ( | Version | other | ) |
If both this and the given version are semantic versions then this compares with the behaviour of Semantic#compareTo(Semantic).
Otherwise both versions are compared with their raw() strings, using the FlexVer comparison scheme
Implemented in org.quiltmc.loader.impl.metadata.qmj.GenericVersionImpl, and org.quiltmc.loader.impl.metadata.qmj.SemanticVersionImpl.
| String org.quiltmc.loader.api.Version.raw | ( | ) |
Implemented in org.quiltmc.loader.impl.metadata.qmj.GenericVersionImpl, and org.quiltmc.loader.impl.metadata.qmj.SemanticVersionImpl.