-
- All Implemented Interfaces:
-
java.io.Serializable,java.lang.Comparable
public class Version implements Serializable, Comparable<Version>
This type represents a semantic version. It can be initialized with a string or a long, and there is no limit to the number of parts your semantic version can contain. The class allows comparison based on semantic version rules. Valid versions (In sorted order):
- 0
- 0.1
- 1.0.0
- 1.0.9
- 1.0.10
- 1.2.3
- 5
- zero
- 0.1+2015.10.21
- 1.0.0a
- 1.0-rc2
- 1.0.10-SNAPSHOT
- 5a
- FF01
-
-
Constructor Summary
Constructors Constructor Description Version()Version(JSONObject json)Version(long version)
-
Method Summary
Modifier and Type Method Description StringgetVersion()voidsetVersion(String version)intcompareTo(Version other)booleanequals(Object o)StringtoString()-
-
Constructor Detail
-
Version
Version()
-
Version
Version(JSONObject json)
-
Version
Version(long version)
-
-
Method Detail
-
getVersion
String getVersion()
-
setVersion
void setVersion(String version)
-
-
-
-