Class CmsModuleVersion

java.lang.Object
org.opencms.module.CmsModuleVersion
All Implemented Interfaces:
Serializable, Comparable<Object>

public class CmsModuleVersion extends Object implements Comparable<Object>, Serializable
A version number for an OpenCms module.

A module version number has the form n1.n2.n3.n4. Only n1 is required, n2 - n4 are optional.

The valid range for each n is 0 - 999. Examples for valid version numbers are 0.9, 1.0.0.5 or 5. The maximum version number is 999.999.999.999.

The comparison is started with n1 being the most important value, followed by n2 - n4. For example 5.0.0.1 > 4.999.999.999 since 5 > 4.

For any n1 - n4, if n > 0 leading zeros are ignored. So 001.002.004.004 = 1.2.3.4. Unrequired leading zeros are automatically stripped from version numbers.

Since:
6.0.0
See Also: