public class VersionWithDots extends java.lang.Object implements java.lang.Comparable<VersionWithDots>
Constructor and Description |
---|
VersionWithDots(int a)
Instantiates a new version with dots.
|
VersionWithDots(int a,
int b)
Instantiates a new version with dots.
|
VersionWithDots(int a,
int b,
int c)
Instantiates a new version with dots.
|
VersionWithDots(int a,
int b,
int c,
int d)
Instantiates a new version with dots.
|
VersionWithDots(java.lang.String fromString)
Instantiates a new version with dots.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
checkDifferentVersions(java.lang.Object localVersion,
java.lang.Object remoteVersion)
Compare two objects trying to convert them to numbers before
comparison.
|
int |
compareTo(VersionWithDots o)
Compare to.
|
boolean |
equals(java.lang.Object obj)
Equals.
|
int |
hashCode()
Hash code.
|
static boolean |
isVersionString(java.lang.String value)
Returns true if the string can be converted into a version
representation with 1 to 4 integers separated by dots.
|
java.lang.String |
toString()
To string.
|
public VersionWithDots(int a)
a
- the apublic VersionWithDots(int a, int b)
a
- the ab
- the bpublic VersionWithDots(int a, int b, int c)
a
- the ab
- the bc
- the cpublic VersionWithDots(int a, int b, int c, int d)
a
- the ab
- the bc
- the cd
- the dpublic VersionWithDots(java.lang.String fromString)
fromString
- the from stringpublic static boolean isVersionString(java.lang.String value)
Valid sample version numbers are:
0.0.0.0
0
10
10.0
10.1
2.8.7
value
- the valuepublic static boolean checkDifferentVersions(java.lang.Object localVersion, java.lang.Object remoteVersion)
localVersion
- the local versionremoteVersion
- the remote versionpublic java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the objpublic int hashCode()
hashCode
in class java.lang.Object
public int compareTo(VersionWithDots o)
compareTo
in interface java.lang.Comparable<VersionWithDots>
o
- the oCopyright 2006-2015 Reporting Standard S.L., C/ Torrecilla del Puerto 1, 28043, Madrid, Espaņa