summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sliPluginUtils/provider/src/main/java/org/onap/ccsdk/sli/core/slipluginutils/SliPluginUtils.java34
1 files changed, 34 insertions, 0 deletions
diff --git a/sliPluginUtils/provider/src/main/java/org/onap/ccsdk/sli/core/slipluginutils/SliPluginUtils.java b/sliPluginUtils/provider/src/main/java/org/onap/ccsdk/sli/core/slipluginutils/SliPluginUtils.java
index e6811e78..488dc395 100644
--- a/sliPluginUtils/provider/src/main/java/org/onap/ccsdk/sli/core/slipluginutils/SliPluginUtils.java
+++ b/sliPluginUtils/provider/src/main/java/org/onap/ccsdk/sli/core/slipluginutils/SliPluginUtils.java
@@ -26,6 +26,7 @@ import java.io.FileOutputStream;
import java.io.PrintStream;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
@@ -489,6 +490,7 @@ public class SliPluginUtils implements SvcLogicJavaPlugin {
switch( logLevel ) {
case TRACE:
log.trace(log_message);
+ break;
case DEBUG:
log.debug(log_message);
break;
@@ -648,6 +650,38 @@ public class SliPluginUtils implements SvcLogicJavaPlugin {
return 0;
}
+
+ public boolean equals(Object object) {
+ if (this == object) {
+ return true;
+ }
+ if (!(object instanceof SortableCtxListElement)) {
+ return false;
+ }
+ if (!super.equals(object)) {
+ return false;
+ }
+
+ SortableCtxListElement that = (SortableCtxListElement) object;
+
+ if (child_elements != null ? !child_elements.equals(that.child_elements)
+ : that.child_elements != null) {
+ return false;
+ }
+ // Probably incorrect - comparing Object[] arrays with Arrays.equals
+ if (!Arrays.equals(sort_fields, that.sort_fields)) {
+ return false;
+ }
+
+ return true;
+ }
+
+ public int hashCode() {
+ int result = super.hashCode();
+ result = 31 * result + (child_elements != null ? child_elements.hashCode() : 0);
+ result = 31 * result + Arrays.hashCode(sort_fields);
+ return result;
+ }
}
/**