Changing toString on ToscaPolicyXXXIdentifiers 70/108970/4
authorRossC <ross.carter@est.tech>
Tue, 9 Jun 2020 13:35:41 +0000 (14:35 +0100)
committerRossC <ross.carter@est.tech>
Tue, 9 Jun 2020 15:19:32 +0000 (16:19 +0100)
Issue-ID: POLICY-2078
Change-Id: I0e8aae118a52aaef7e372293396802b85782a22c
Signed-off-by: RossC <ross.carter@est.tech>
models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaPolicyIdentifier.java
models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaPolicyIdentifierOptVersion.java
models-tosca/src/main/java/org/onap/policy/models/tosca/authorative/concepts/ToscaPolicyTypeIdentifier.java

index f98a238..ba10428 100644 (file)
@@ -3,6 +3,7 @@
  * ONAP Policy Models
  * ================================================================================
  * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2020 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -83,4 +84,9 @@ public class ToscaPolicyIdentifier implements Comparable<ToscaPolicyIdentifier>
 
         return ObjectUtils.compare(getVersion(), other.getVersion());
     }
+
+    @Override
+    public String toString() {
+        return this.name + " " + this.version;
+    }
 }
index ca3684a..43e7114 100644 (file)
@@ -3,6 +3,7 @@
  * ONAP Policy Models
  * ================================================================================
  * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2020 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -73,4 +74,9 @@ public class ToscaPolicyIdentifierOptVersion implements Comparable<ToscaPolicyId
 
         return ObjectUtils.compare(getVersion(), other.getVersion());
     }
+
+    @Override
+    public String toString() {
+        return this.name + " " + this.version;
+    }
 }
index 4cd1764..32dd7cb 100644 (file)
@@ -3,6 +3,7 @@
  * ONAP Policy Models
  * ================================================================================
  * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2020 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -83,4 +84,9 @@ public class ToscaPolicyTypeIdentifier implements Comparable<ToscaPolicyTypeIden
 
         return ObjectUtils.compare(getVersion(), other.getVersion());
     }
+
+    @Override
+    public String toString() {
+        return this.name + " " + this.version;
+    }
 }