|
|
|
@ -17,6 +17,7 @@ package org.thingsboard.server.edqs.data.dp; |
|
|
|
|
|
|
|
import lombok.Getter; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.thingsboard.server.common.data.edqs.DataPoint; |
|
|
|
|
|
|
|
@RequiredArgsConstructor |
|
|
|
@ -56,19 +57,7 @@ public abstract class AbstractDataPoint implements DataPoint { |
|
|
|
|
|
|
|
@Override |
|
|
|
public int compareTo(DataPoint dataPoint) { |
|
|
|
String str1 = this.valueToString(); |
|
|
|
String str2 = dataPoint.valueToString(); |
|
|
|
|
|
|
|
if (str1 == null && str2 == null) { |
|
|
|
return 0; |
|
|
|
} |
|
|
|
if (str1 == null) { |
|
|
|
return -1; |
|
|
|
} |
|
|
|
if (str2 == null) { |
|
|
|
return 1; |
|
|
|
} |
|
|
|
return str1.compareToIgnoreCase(str2); |
|
|
|
return StringUtils.compareIgnoreCase(valueToString(), dataPoint.valueToString()); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|