diff options
Diffstat (limited to 'models-base/src/main/java/org')
5 files changed, 5 insertions, 5 deletions
diff --git a/models-base/src/main/java/org/onap/policy/models/base/PfConceptContainer.java b/models-base/src/main/java/org/onap/policy/models/base/PfConceptContainer.java index 99b5f9710..63ab14ee5 100644 --- a/models-base/src/main/java/org/onap/policy/models/base/PfConceptContainer.java +++ b/models-base/src/main/java/org/onap/policy/models/base/PfConceptContainer.java @@ -261,7 +261,7 @@ public class PfConceptContainer<C extends PfConcept, A extends PfNameVersion> ex return 0; } if (getClass() != otherConcept.getClass()) { - return this.hashCode() - otherConcept.hashCode(); + return getClass().getName().compareTo(otherConcept.getClass().getName()); } @SuppressWarnings("unchecked") diff --git a/models-base/src/main/java/org/onap/policy/models/base/PfConceptKey.java b/models-base/src/main/java/org/onap/policy/models/base/PfConceptKey.java index dfc356060..17fda7cfe 100644 --- a/models-base/src/main/java/org/onap/policy/models/base/PfConceptKey.java +++ b/models-base/src/main/java/org/onap/policy/models/base/PfConceptKey.java @@ -310,7 +310,7 @@ public class PfConceptKey extends PfKey { return 0; } if (getClass() != otherObj.getClass()) { - return this.hashCode() - otherObj.hashCode(); + return getClass().getName().compareTo(otherObj.getClass().getName()); } final PfConceptKey other = (PfConceptKey) otherObj; diff --git a/models-base/src/main/java/org/onap/policy/models/base/PfKeyUse.java b/models-base/src/main/java/org/onap/policy/models/base/PfKeyUse.java index 836707ef2..d56b0dbab 100644 --- a/models-base/src/main/java/org/onap/policy/models/base/PfKeyUse.java +++ b/models-base/src/main/java/org/onap/policy/models/base/PfKeyUse.java @@ -152,7 +152,7 @@ public class PfKeyUse extends PfKey { return 0; } if (getClass() != otherObj.getClass()) { - return this.hashCode() - otherObj.hashCode(); + return getClass().getName().compareTo(otherObj.getClass().getName()); } final PfKeyUse other = (PfKeyUse) otherObj; diff --git a/models-base/src/main/java/org/onap/policy/models/base/PfModel.java b/models-base/src/main/java/org/onap/policy/models/base/PfModel.java index 3dc233b02..07ec3af04 100644 --- a/models-base/src/main/java/org/onap/policy/models/base/PfModel.java +++ b/models-base/src/main/java/org/onap/policy/models/base/PfModel.java @@ -274,7 +274,7 @@ public abstract class PfModel extends PfConcept { return 0; } if (getClass() != otherObj.getClass()) { - return this.hashCode() - otherObj.hashCode(); + return getClass().getName().compareTo(otherObj.getClass().getName()); } final PfModel other = (PfModel) otherObj; diff --git a/models-base/src/main/java/org/onap/policy/models/base/PfReferenceKey.java b/models-base/src/main/java/org/onap/policy/models/base/PfReferenceKey.java index bda5aed12..bdf16dcdf 100644 --- a/models-base/src/main/java/org/onap/policy/models/base/PfReferenceKey.java +++ b/models-base/src/main/java/org/onap/policy/models/base/PfReferenceKey.java @@ -405,7 +405,7 @@ public class PfReferenceKey extends PfKey { return 0; } if (getClass() != otherObj.getClass()) { - return this.hashCode() - otherObj.hashCode(); + return getClass().getName().compareTo(otherObj.getClass().getName()); } final PfReferenceKey other = (PfReferenceKey) otherObj; |