fixed time order when less than 10 sec
This commit is contained in:
parent
7dafdd20c3
commit
881be659b0
@ -399,10 +399,15 @@ public class Facade {
|
||||
//System.out.println("mapName: " + mapboard.getMapName());
|
||||
List<MapValues> mapvalues = new ArrayList();
|
||||
List<MapValues> less_than_a_minute = new ArrayList<>();
|
||||
List<MapValues> less_than_10_seconds = new ArrayList<>();
|
||||
for (MapValues mv : mapboard.getMapvalues())
|
||||
{
|
||||
String time = mv.getTime();
|
||||
if (!time.contains(":"))
|
||||
int indexOf = time.indexOf(".");
|
||||
if (indexOf == 1){
|
||||
less_than_10_seconds.add(mv);
|
||||
}
|
||||
else if (!time.contains(":"))
|
||||
{
|
||||
less_than_a_minute.add(mv);
|
||||
}
|
||||
@ -410,10 +415,12 @@ public class Facade {
|
||||
mapvalues.add(mv);
|
||||
}
|
||||
}
|
||||
less_than_10_seconds.sort(Comparator.comparing(MapValues::getTime));
|
||||
mapvalues.sort(Comparator.comparing(MapValues::getTime));
|
||||
less_than_a_minute.sort(Comparator.comparing(MapValues::getTime));
|
||||
less_than_a_minute.addAll(mapvalues);
|
||||
mapBoardCache.get(mapboard.getMapName()).setMapvalues(less_than_a_minute);
|
||||
less_than_10_seconds.addAll(less_than_a_minute);
|
||||
less_than_10_seconds.addAll(mapvalues);
|
||||
mapBoardCache.get(mapboard.getMapName()).setMapvalues(less_than_10_seconds);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user