#3 -- fix comparator
This commit is contained in:
parent
3e26083765
commit
c309c71b84
@ -2,7 +2,7 @@ package ru.ulstu.db.model;
|
||||
|
||||
import ru.ulstu.datamodel.ts.TimeSeries;
|
||||
|
||||
public class TimeSeriesMeta {
|
||||
public class TimeSeriesMeta implements Comparable<TimeSeriesMeta> {
|
||||
private String key;
|
||||
private int size;
|
||||
private boolean hasDateTime;
|
||||
@ -31,4 +31,9 @@ public class TimeSeriesMeta {
|
||||
public boolean isHasDateTime() {
|
||||
return hasDateTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(TimeSeriesMeta o) {
|
||||
return o != null ? key.compareTo(o.getKey()) : 0;
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ package ru.ulstu.db.model;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class TimeSeriesSet {
|
||||
public class TimeSeriesSet implements Comparable<TimeSeriesSet> {
|
||||
private final String key;
|
||||
|
||||
public TimeSeriesSet(File dir) {
|
||||
@ -16,4 +16,9 @@ public class TimeSeriesSet {
|
||||
public String getKey() {
|
||||
return key;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(TimeSeriesSet o) {
|
||||
return o != null ? key.compareTo(o.getKey()) : 0;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user