我有以下收藏:
Collection<AgentSummaryDTO> agentDtoList = new ArrayList<AgentSummaryDTO>();
哪里AgentSummaryDTO
看起来像这样:
public class AgentSummaryDTO implements Serializable {
private Long id;
private String agentName;
private String agentCode;
private String status;
private Date createdDate;
private Integer customerCount;
}
现在我必须agentDtoList
根据customerCount
字段对集合进行排序,如何实现呢?