如何按某个属性对对象列表进行排序
2022-08-31 06:50:47
我有简单的类
public class ActiveAlarm {
public long timeStarted;
public long timeEnded;
private String name = "";
private String description = "";
private String event;
private boolean live = false;
}
和缺点。如何按升序排序,然后按?任何人都可以帮忙吗?我知道在通用算法和重载运算符<C++,但我是Java的新手。List<ActiveAlarm>
timeStarted
timeEnded