public final class Versions extends Object
| Modifier and Type | Method and Description |
|---|---|
static long |
toLongRepresentation(String version)
Convert a numerical version in decimal form (i.e.
|
static long |
toLongRepresentation(String version,
int maxComponentLength)
Convert a numerical version in decimal form (i.e.
|
public static long toLongRepresentation(String version)
version - public static long toLongRepresentation(String version, int maxComponentLength)
The maxComponentLength parameter is used to ensure that each
component of the version has the necessary padding. You should specify
this value to be the largest possible length of a version number
component in your scheme (i.e. for version A.B.C if component C may
possible go up as high as 999, then you should specify 3 for the
maxComponentLength value).
Warning:If one or more of the component lengths is
greater than maxComponentLength then this method will use the
larger component length in its calculation. This may potentially lead to
unexpected results, so its best to specify the maxComponentLength
to be sufficiently large.
version - maxComponentLength -