summaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api
diff options
context:
space:
mode:
authorayalaben <Ayala.Benzvi@Amdocs.Com>2017-11-16 09:21:41 +0200
committerAvi Gaffa <avi.gaffa@amdocs.com>2017-11-19 13:51:24 +0000
commit914f3a5f952e0799b6fb05788d30562464384a13 (patch)
tree17dc7c2e27b9b127acbe4ba89c8e8b7b1f7c94fb /openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api
parent581e9aa490b015d9b46314663c165a8bf12523d8 (diff)
heal all script
Issue - ID: SDC-665 Change-Id: Ib035549589ccd9c113235886442b1b2c9a198b86 Signed-off-by: ayalaben <ayala.benzvi@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api')
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/Version.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/Version.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/Version.java
index 62d7c81cae..82b79c6bda 100644
--- a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/Version.java
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/Version.java
@@ -125,6 +125,17 @@ public class Version {
return major == version.major && minor == version.minor;
}
+ public int compateTo(Version other){
+ if (this.major>other.major) {
+ return 1;
+ } else if(this.major<other.major){
+ return -1;
+ } else if(this.major == other.major){
+ return Integer.compare(this.minor,other.minor);
+ }
+ return 0;
+ }
+
@Override
public String toString() {
return major + "." + minor;