git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@26714
ac1ea38d-2e2b-0410-8846-
a27921b304fc
package org.simantics.jfreechart.chart.properties;\r
\r
-public class ChartVariable {\r
+public class ChartVariable implements Comparable<ChartVariable>{\r
\r
private String rvi;\r
private String label;\r
ChartVariable other = (ChartVariable)obj;\r
return rvi.equals(other.rvi);\r
}\r
+ \r
+ @Override\r
+ public int compareTo(ChartVariable o) {\r
+ if (label != null && o.label != null) {\r
+ return label.compareTo(o.label);\r
+ }\r
+ return rvi.compareTo(o.rvi);\r
+ }\r
\r
}\r